Menu
Question Index
...


Write a program to find the most occurred word in a given paragraph. Do an ignore case comparison. So 'The' is same as 'the'.

Input (String) Output (String)
Being in your arms makes me feel as though I am truly in heaven showered in an endless rain of happiness for eternity, so just be with me forever. in
Java's primary motivation was platform independence and not internet. Platform independence means the ability to write a program on one platform and run it on any other platform without worrying about the platform specific features. If it works on one platform, it should work on all other platforms. platform
Programmers experienced with C and C++ can easily learn Java and rewrite the code. Java and C/C++ will continue to coexist, since Java solves certain problems and C/C++ solves certain other problems. and
Sun rises in the east Sun
India won the world cup in 2011 India

class FindMostOccurredWordInParagraph

{    public static void main(String s[])
    {
        String paragraph = "Java's primary motivation was platform independence and not internet. Platform independence means the ability to write a program on one platform and run it on any other platform without worrying about the platform specific features. If it works on one platform, it should work on all other platforms.";
        System.out.println("The most occurred word is : " + getMostOccurredWord(paragraph));

    }


public static String getMostOccurredWord(String paragraph) {
//Write code here to identify the most occurred word in given paragraph.
}
}

Doubts

Problems

Topic: Additional String Methods in Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App