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
Is java call by value?
What are basic data types?
Can you pass by reference in java?
Why is singleton not thread safe?
What does the “static” keyword mean? Can you override private or static method in java?
how does the run() method in runnable work? : Java thread
What do you mean by multithreaded program?
What is locale in java?
Why do we need singleton class?
Print Vertical traversal of a Binary Tree.
What are different types of expressions?
What does void * mean?
Can we rethrow the same exception from catch handler?
How to provide security in java
What do you mean by ternary operator in java?