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 reverse sort in java?
Do loops java?
Which method must be implemented by all threads?
What is cr keyboard?
What does the three dot emoji mean?
How do you check if two strings are equal in java?
How to instantiate member inner class?
How do you insert a line break?
What does main method?
Discuss about garbage collector in Java.
What is callable java?
Explain the scope or life time of class variables or static variables?
What do you mean by aggregation?
Why map is used in java?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.