Question Index

Write a program to remove the preoccured characters from the given sentence.

Input (String) Output (String)
Hello How are you Helo w ar yu
I am good boy I am god by
Indians love cricket Indas love crkt
Learn Java with Merit Campus Learn Jv with M Cpus

class RemovePreoccuredCharacters
    public static void main(String s[])
        String sentence = "Hello How are you";
        System.out.println("After removing pre occured characters : " + removePreoccuredCharacters(sentence));


    public static String removePreoccuredCharacters(String sentence) {




Topic: toLowerCase() And toUpperCase() Methods In Java

Read this topic
Take test on this topic

Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App