Print "Censored" if userInput contains the word "darn", else print userInput. End with newline

Print “Censored” if userInput contains the word “darn”, else print userInput. End with newline.

import java.util.Scanner;
public class CensoredWords {
public static void main (String
[
]
args) {
String userInput = “”;
userInput = “That darn cat.”;
/* Your solution goes here */
return; by using indexOf()