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 / hema

package sampleques;
/**
* Author-Hema
* => Program that prints the nos. of each word count of
String in Descending order!!!
*/


public class CountStringWords {
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 );
}
}
}

Is This Answer Correct ?    20 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are the methods of the math class static?

1023


Can we override the static methods?

976


Is a class subclass of itself?

1026


What is the difference between break and continue statements?

979


What is the default execution method in java?

1128


Define nashorn in java8.

971


What is finally and finalize in java?

1017


Variable of the boolean type is automatically initialized as?

960


What is the loop in java?

1050


Can we sort hashmap in java?

897


What is difference between fail-fast and fail-safe?

1175


Is math class static in java?

1048


java program with complete 4 oops concepts implemented example

3093


Difference between string, stringbuffer and stringbuilder?

985


What are the types of arrays in java?

1024