Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the polymorphism principle?

1027


Do we need to manually write Copy Constructor?

1037


What is array size in java?

965


Explain importance of inheritance in java?

1032


What is string literal in java?

1058


What does sprintf return?

1068


Which is the best sorting technique in java?

989


Can inner class final?

1103


What is the order of arraylist in java?

1143


What is an example of a conditional statement?

1057


Is it possible to write a regular expression to check if string is a number?

1033


What is the primary benefit of encapsulation?

1092


What is the difference between length and length () in java?

950


Explain the difference between hashmap and hashtable in java?

950


What does it mean that a method or field is “static”?

978