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!

Java question I'm writing a program to prompt user to enter a

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!