Course Solutions Uncategorized (Solved) : Java Problem Trying Censor Unwanted Word However Censors Every Word Unwanted Word Censor Q26757383 . . . .

(Solved) : Java Problem Trying Censor Unwanted Word However Censors Every Word Unwanted Word Censor Q26757383 . . . .

 

Java problem

Trying to censor the unwanted word with *, however it censorsevery word that has the unwanted word in it. How to only censor theunwanted word itself regardless of the captial letter? Thanks

Sample output:

please enter the paragraph you would like filtered: Applepieapplejuice 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; i < word.length(); i++) { filter +* paragraph paragraph.replaceAll(word, filter); System.out.println(Filtered: + paragraph);

import

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered) : Please Use Normal Distribution Basic Inventory Model Formula Solve Q28063516(Answered) : Please Use Normal Distribution Basic Inventory Model Formula Solve Q28063516

please use normal distribution or basic inventory modelformula to solve this<br/><br/><img width="100" height="19" src="https://www.chegg.com/var/mobile/Containers/Data/Application/8EEE5AC7-A7B3-4326-95FF-BEDEB5DE4DD9/Library/Caches/041FEE5C-8997-471C-A9B8-14523EE5FD68.jpg" class="uploaded-image" alt="https://www.chegg.com/homework-help/questions-and-answers/041FEE5C-8997-471C-A9B8-14523EE5FD68.jpg"/><img src="https://media.cheggcdn.com/media%2F5d8%2F5d8f97ea-5f12-43fa-b9e0-a7327605e1b4%2Fimage" alt="media%2F5d8%2F5d8f97ea-5f12-43fa-b9e0-a7"/>