Question: Java question I'm writing a program to prompt user to enter a paragraph and the specific word that they want to censor and eventually output
Java question
I'm writing a program to prompt user to enter a paragraph and the specific word that they want to censor and eventually output the censored paragraph. How to write a program without using array? Also, space, period, quiestion mark, comma or exclamtion point could be censored.
For example:
Paragraph: I scream, you scream, we all scream for ice cream!
word needed to be censored with *: "we all scream for ice cream"
Output: I scream, you scream, XXXXXXXXXXXXXXXXXXXXXXXXXXX!

import java.util.Scanner; public class Random public static void main(String[ args) f Scanner input = new Scanner(System.in); System.out.println( "Please enter the paragraph you would like filtered: "); String paragraph input.nextLine); System.out.println ("Please enter the word you would like to filter: "); String word -input.nextLine); System.out.println("Unfiltered:"paragraph); for(int i0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
