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
Why are the methods of the math class static?
Can we override the static methods?
Is a class subclass of itself?
What is the difference between break and continue statements?
What is the default execution method in java?
Define nashorn in java8.
What is finally and finalize in java?
Variable of the boolean type is automatically initialized as?
What is the loop in java?
Can we sort hashmap in java?
What is difference between fail-fast and fail-safe?
Is math class static in java?
java program with complete 4 oops concepts implemented example
Difference between string, stringbuffer and stringbuilder?
What are the types of arrays in java?