Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java problem Trying to censor the unwanted word with *, however it censors every word that has the unwanted word in it. How to only
Java problem
Trying to censor the unwanted word with *, however it censors every word that has the unwanted word in it. How to only censor the unwanted word itself regardless of the captial letter? Thanks
Sample output:
please enter the paragraph you would like filtered: Applepie applejuice Appleorange applebanana apple Apple
please enter the word you would like to filter: apple
output: Applepie applejuice Appleorange applebanana ***** *****
import java.util.Scanner; public class Random public static void main(String[l args) 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 wo rd = input.nextLine(); System.out.println("Unfiltered: "paragraph) String filter = ""; for (int i=0; iStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started