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...

int a=10,b=20,c=30 a= b+c;b=a+c;c=a+b;
System.out.println("The value is"+a+b+c;

Answer Posted / manikandan

int a=10,b=20,c=30;
a= b+c;b=a+c;c=a+b;
System.out.println("The value is"+a+b+c);

First a=10; b=20;c=30;

a=b+c; ---> (ie) a=20+30 , a=50

b=a+c ---->(ie) b= 50+30 , b=80

c=a+b -----> (ie) c= 50+80 , c=130

then in final statement it should print a+b+c , it considers
all 3 has string so , "50"+"80"+"130" (i.e.) "5080130"

therefore answers is , 5080130

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the destroy method?

1053


What are format specifiers in java?

1076


Explain the importance of thread scheduler in java?

1023


Is java type safe?

972


How do you initialize an arraylist in java?

1051


Can private class be inherited in java?

1036


Explain yield() method in thread class ?

1073


Can a function return a function?

1046


Explain the importance of finally over return statement?

1050


How to change the priority of thread or how to set the priority of thread?

1046


Give the hierarchy of inputstream and outputstream classes.

1112


What are loops in java? What are three types of loops?

1036


What is class forname used for?

1057


What is null object in java?

1019


How to make a write-only class in java?

1076