1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gekata [30.6K]
3 years ago
11

Print "Censored' if userlnput contains the word "darn, else print userlnput. End with newline. Ex: If userinput is "That darn ca

t., then output is: Censored Ex: If userlnput is "Dang, that was scary!", then output is: Dang, that was scary! Note: If the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report Program end never reached. The system doesn't print the test case that caused the reported message. 1 import java.util.Scanner; 3 public class CensoredWords 4public static void main ( 1 test passed String args) Scanner scnr -new Scanner(System.in); String userInput; A tests passed userInput scnr.nextLine); 10 Your solution goes here 12 13 Run
Computers and Technology
1 answer:
sasho [114]3 years ago
6 0

Answer:

The code is given below in Java with appropriate comments

Explanation:

//Import the input.

import java.util.Scanner;

class CensoredWords

{

    //Define the main method.

    public static void main(String args[ ])

    {

         //Define the variables.

         String userInput="" ;          

         //Define the scanner object

         Scanner scobj = new Scanner(System.in);

          //Accept the userInput.

         System.out.print("Enter String: ");

         userInput=scobj.nextLine();

         //Check if the input contains darn.

         //Print censored.

         if(userInput.toUpperCase().indexOf("DARN") != -1)

         System.out.printf("Censored");

         //IF the input does not contains darn

         //Print userInput.

         else

System.out.printf(userInput)

         return;

}

}

You might be interested in
How many binary digits does a single hexadecimal digit represent?
Anna35 [415]
Four binary digits.  So letter D.


8 0
3 years ago
Identify the type of error.<br> print "hello"<br><br> num = 5 / 0
horrorfan [7]

Answer:

Syntax error

Explanation:

This is a type of error that occurs when there is a problem with the code that makes it unable to compile and execute.

For example, making a conditional statement without using the correct parameters will result in a syntax error.

4 0
2 years ago
Read 2 more answers
What are the characteristics of:<br> Master file<br> Transaction file<br> Reference file
IRISSAK [1]
<h3>Master File :-</h3>
  • Master files contain descriptive data, such as name and address, as well as summary information, such as amount due and year-to-date sales.

<h3>Transaction File :-</h3>
  • Fast performance with a rapid response is critical. Organisations rely heavily on their TPS with failure possibly stopping business.

<h3>Reference File :-</h3>
  • Information in one drawing can be overlaid on a different drawing, eliminating the need to redraw information.
  • Proper use of reference files will result in significant time savings and greater coordination of drawings.

Explanation:

<h3>Hope it helps you!</h3>
7 0
1 year ago
Why is removing presentation-oriented markup from one's html document considered to be a best practice?
Gelneren [198K]

Answer

Its for the purpose of  maintenance and readability

Explanation

A presentation-oriented markup web application generates interactive web pages containing various types of markup language.

Markup is a language designed for the purposes of processing definition and presentation. It specifies code for formatting, both the layout and style, within a text file. Markup describes the structure while the styling is how it looks. it uses the code to specify the formatting which are called tags.

3 0
3 years ago
Universal Containers is creating a custom Visualforce page to allow users to edit contact records. The developer has used an ape
Gre4nikov [31]

Answer:

field will be automatically taken off the page for the user

Explanation:

When designing a custom VisualForce page the piece of code mentioned "apex: outputField" is used to determine what and how information is displayed to a certain user. This being said if the user does not have field-level security access and tries to enter the VisualForce page then the field will be automatically taken off the page for the user, and they will not be able to view it.

If you have any more questions feel free to ask away at Brainly.

7 0
2 years ago
Other questions:
  • Trevor got home from work and suddenly realized that he needed to edit a certain file stored in the company network's server. ho
    11·1 answer
  • Assume you have a sorting algorithm that you can use as a black box. Use the sorting algorithm to sort the input list. Now write
    10·1 answer
  • To type the letter address, _________ space from the dateline
    9·2 answers
  • The _______ has shortcuts to commonly used commands
    8·2 answers
  • Which ipv6 router message is sent via multicast with a scope of link-local with the expectation that all local routers will iden
    5·1 answer
  • Head-mounted displays often use organic light emitting diode,or technology.
    15·1 answer
  • The lines that connect the points of a polygon are called: (1 point)
    6·2 answers
  • Koi jinda hei kya hello​
    13·2 answers
  • Which operating system might cause the desktop background to change unexpectedly?
    7·1 answer
  • The Save command saves your changes silently without additional prompts, using the same save settings; the Save As command reope
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!