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 |
What is arrays sort in java?
What is data string?
What is null statement?
I want to re-reach and use an object once it has been garbage collected. How it's possible?
What are the interfaces defined by Java.lang package?
What is another word for methodology?
Explain when we should make an instance variable private.
What is the difference between I ++ and ++ I in java?
Is there any use of an abstract class which has no methods and no attributes?
Give the difference between the println method and sqrt method?
Explain constructors and types of constructors in java.
Is 0 an irrational number?