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 is connection class in java?
What is autoboxing in java?
What best practices should you follow while writing multithreaded code in java?
What are parsers? Dom vs sax parser.
What is the difference between overriding & overloading?
What do you mean by composition in java?
Why is java so popular?
Can keyword be used as identifier?
what methods would you overwrite in java.lang.object class?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
Can a constructor have different name than a class name in java?
Explain restrictions on using enum?
Can a class have multiple subclasses?
Can we declare a static variable inside a method?
What is dynamic array in java?