Write a java program to get a string of words and print the numbers of each word count in descending order
Answers were Sorted based on User's Feedback
Answer / karthick
package com.subex.exm;
/**
* Author-Hema
* => Program that prints the nos. of each word count of
String in Descending order!!!
*/
public class subexExp {
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);
System.out.println(s.charAt(i-1));
}
}
}
| Is This Answer Correct ? | 2 Yes | 7 No |
Can a java program have 2 main methods?
What are serialization and deserialization?
Difference between JVM and JRE?
What is the default size of load factor in hashing based collection?
What are measurable parameters?
Why is it called a string?
what is use of session tracking ?with example?
How to make a class immutable?
What is the latest java version?
Why is java not 100% pure oops?
What are parsers? Dom vs sax parser.
When object is created and destroyed?