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

Can private members of a base class are inheritable justify?

870


What is lambda expression in java?

965


What is annotation in java?

996


Where pragma is used?

992


How to make object serializable in java?

924


Can we force garbage collector to run ?

1000


Do I need java on my computer?

922


Can we override private methods?

974


What are constants and how to create constants in java?

934


What is core java called?

920


If a method is declared as protected, where may the method be accessed in java programming?

940


What are controls and their different types in awt?

1017


can java object be locked down for exclusive use by a given thread? : Java thread

1021


State some situations where exceptions may arise in java?

1002


why using interface interface ?

1972