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



Write a java program to get a string of words and print the numbers of each word count in descending..

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

Post New Answer

More Core Java Interview Questions

Which is fastest collection in java?

0 Answers  


Why javac is not recognized?

0 Answers  


What is function declaration?

0 Answers  


wht is customised exception?

1 Answers   Logica CMG, Novell, Prudential,


can any one tell me what is advantage of encapsulation

2 Answers  






Explain public static void main(string args[]) in java.

0 Answers  


What is stored procedure. How do you create stored procedure ?

0 Answers   GE,


What is OOPS Concept?

1 Answers   Cap Gemini,


explain different ways of using thread? : Java thread

0 Answers  


Where pragma is used?

0 Answers  


What is module in oop?

0 Answers  


How to create an instance of a class if the class has private constructor?

3 Answers  


Categories