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 |
Is java a security risk?
What is a boolean expression in java?
How to split arraylist elements in java?
Can we create an object of static class in java?
What is finally and finalize in java?
What are advantages of exception handling in java?
Tell me about different OOPS concepts.
What is identifier give example?
Is sizeof a preprocessor?
what is heap memory?
0 Answers Tavant Technologies, Zensar,
What is the difference between length and length () in java?
What are the characteristics of java?