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
What about anonymous inner classes in java?
How do you add an element to a set in java?
What is difference between filereader and bufferedreader?
What happens if an exception is throws from an object's constructor?
How variables are declared?
What is difference between == equals () and compareto () method?
Why is java not 100% pure oops?
What is the advantage of functional interface in java 8?
What will be the initial value of an object reference which is defined as an instance variable?
Can a static method be final?
What is a literal coding?
Can we use string in the switch case?
Which is the best approach for creating thread ?
What are mutable classes?
What are classloaders?