Write a program to find the least occurred word which has atleast 5 characters in given paragraph.
Input (String) | Output (String) |
---|---|
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. | makes |
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. | Programmers |
Sun rises in the east | rises |
India won the world cup in 2011 | India |
class FindLeastOccurredWordInParagraph
{ 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 least occurred word is : " + getLeastOccurredWord(paragraph));
}
public static String getLeastOccurredWord(String paragraph) {
//Write code here to identify the least occurred word which has atleast 5 characters in given paragraph.
}
}