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 use catch statement for checked exceptions?
What is a wrapper method?
What are three advantages of using functions?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
How do you join strings in java?
How do you convert string to int in java?
What does a method signature consist of?
What methods are used to get and set the text label displayed by a button object?
how to handle exceptions in ejb?
What is a qualifier in a sentence?
What is volatile keyword in java
If two threads have same priority which thread will be executed first ?