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


Please Help Members By Posting Answers For Below Questions

How does java enable high performance?

807


Which is easier netbeans or eclipse?

717


What is type safety in java?

598


Detail discussions on JVM, memory management and garbage collector.

635


what is the constructor and how many types of constructors are used in java?

618






What is package private scope in java?

617


What are meta-annotations?

642


How large is a boolean?

653


What is protected access modifier?

677


Can we write class inside a class in java?

633


What is the program compilation process?

675


Explain the difference between extends thread vs implements runnable in java?

658


What are the types of strings?

659


Explain the meaning of java applet.

688


what is synchronization and why is it important? : Java thread

702