Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is difference in between java class and bean?

1090


What is a Hash Table? What are the advantages of using a hash table?

1086


How do you ensure that n threads can access n resources without deadlock?

1309


How would you format a date in java? I.e. In the ddmmyyy format?

1379


EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.

9210


What is parseint?

1011


What is a parameter in a function?

997


Mention a package that is used for linked list class in java.

979


Explain the difference between protected and default access.

995


Why is logger singleton?

1125


What is protected in java?

995


Why use string handling in Java?

1026


What is the latest java version?

1059


What is lambda in java?

1072


What does nullpointerexception mean?

1083