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

(Solved) : 120 Marks Use 2×2 Dithering Matrix Shown Apply Ordered Dither Algorithm 8 B Grey Scale Ima Q35784069 . . . .(Solved) : 120 Marks Use 2×2 Dithering Matrix Shown Apply Ordered Dither Algorithm 8 B Grey Scale Ima Q35784069 . . . .

<br/><img src="https://media.cheggcdn.com/media%2F159%2F1599ed6e-6ad2-42c7-bc07-2f8fda54dd95%2Fimage.png" alt="120 Marks Use the 2x2 dithering matrix shown below to apply the ordered dither algorithm on the 8-b it grey scale image whose" aria-describedby="d3f"/>120 Marks Use the 2x2