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 we write multiple catch blocks under single try block?
Does sprintf add a null terminator?
When can you say a graph to be a tree?
What is entry set in java?
what is purpose of writting public static void main(Strind arg[]) in java..?
What is java developer skills?
How are this and super used?
Why we use multi threading instead of multiprocessing?
What does i ++ mean in Java?
What do heavy weight components mean in java programming?
What is difference between checked and unchecked exception in java?
Can we have two methods in a class with the same name?