Write program to print Hello World and print each character
address in that string and print how many times each
character is in that string?
Ex: H: 0 & 1
e:1 & 1
l :2,3,8 & 3
o:4,6 & 2
w:5 & 1
r: 7 & 1
d 9 & 1
Answer Posted / noor
Little change in the code
add this for loop
for (int x = i - 1; x >= 0; x--)
instead of
for (int x = i - 1; x > 0; x--)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can private members of a base class are inheritable justify?
What is lambda expression in java?
What is annotation in java?
Where pragma is used?
How to make object serializable in java?
Can we force garbage collector to run ?
Do I need java on my computer?
Can we override private methods?
What are constants and how to create constants in java?
What is core java called?
If a method is declared as protected, where may the method be accessed in java programming?
What are controls and their different types in awt?
can java object be locked down for exclusive use by a given thread? : Java thread
State some situations where exceptions may arise in java?
why using interface interface ?