Write a java program to get a string of words and print the numbers of each word count in descending order
Answer Posted / hema
package sampleques;
/**
* Author-Hema
* => Program that prints the nos. of each word count of
String in Descending order!!!
*/
public class CountStringWords {
public static void main(String[] args) {
String s="HemaLovesMilind";
System.out.println(s);
for(int i=s.length();i>0;i--)
{
System.out.println(i );
}
}
}
| Is This Answer Correct ? | 20 Yes | 23 No |
Post New Answer View All Answers
What is the purpose of the system class in java?
Are arrays classes in java?
Wha is the output from system.out.println(“hello”+null); ?
Is string a class?
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
Explain wrapper classes in java?
What's the default access specifier for variables and methods of a class?
what are three ways in which a thread can enter the waiting state? : Java thread
What does compareto () do in java?
Is ++ operator is thread safe in java?
What is assembly condition codes?
What is a boolean output?
Explain the meaning of java applet.
What is public/private protected in java?
Can we rethrow the same exception from catch handler?