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
Can a constructor be made final?
What does += mean coding?
What is the program development process?
What is the advantage of OOP in java?
What are the benefits of operations?
Can static methods be inherited?
What are the string methods in java?
Is java free for businesses?
Is 0 an even number?
What is java beans?
What is the use of arraylist in java?
What are the disadvantages of using inner classes?
Explain wrapper classes in java?
What's the purpose of using break in each case of switch statement?
What package is math in java?