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...

Hi,

This is ravi i have a question like this i have string
"UNDERSTAND" now i want to count the letters how many times
it occures.i.e from the above string the out put should be
like this U-1,N-2,D-2,E-1,R-1,S-1,T-1,A-1.
how can i achieve this

Thnaks in advance for your response ..

Answer Posted / dilip

Actually what i think is take integers from a-z and
initialize each with 0



then take the string & using charAt & equalsIgnoreCase
increment the respaective values & then print the same.....

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ternary operator?

1003


What is serialization in java?

1058


What is meant by distributed application? Why are we using that in our application?

947


What are the high-level thread states in java programming?

1056


What is the difference between delete and delete[]

1535


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

1240


What are the escape sequences in java?

1024


What is the benefit of inner classes in java?

1085


What is nan inf?

1078


what is the purpose of "virtual"?

1085


What are methods in java?

991


How to display all the prime numbers between 1 and n (n is the number, get the input from user)

978


Explain about member inner classes?

1098


Does java initialize arrays to zero?

1030


What does regex mean?

1011