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
How do you end a program?
What does this () mean in constructor chaining concept?
Can we split string with in java?
I want to re-reach and use an object once it has been garbage collected. How it's possible?
What type of variable is error flag?
Why do we need wrapper classes?
Which package is used for pattern matching with regular expressions?
Can you have two constructors in java?
What are the different types of multitasking?
Is zero a positive integer?
What is identifier in java?
What is pojo class in java?
What is a treeset class?
What are passing parameters?
what is encapsulation in java? Explain