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

Is java call by value?

1098


What are basic data types?

1102


Can you pass by reference in java?

983


Why is singleton not thread safe?

1053


What does the “static” keyword mean? Can you override private or static method in java?

1100


how does the run() method in runnable work? : Java thread

927


What do you mean by multithreaded program?

1013


What is locale in java?

1021


Why do we need singleton class?

1007


Print Vertical traversal of a Binary Tree.

1018


What are different types of expressions?

1122


What does void * mean?

1038


Can we rethrow the same exception from catch handler?

1132


How to provide security in java

2282


What do you mean by ternary operator in java?

1024