Question: Java Print Censored if userInput contains the word darn, else print userInput. End with newline. Ex: If userInput is That darn cat., then output is:
Java
Print "Censored" if userInput contains the word "darn", else print userInput. End with newline. Ex: If userInput is "That darn cat.", then output is: Censored Ex: If userInput is "Dang, that was scary!", then output is: Dang, that was scary!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
