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

How to create a thread in java?

1113


Explain different types of thread priorities ?

1059


What is mysql driver class name?

1128


Difference between abstract and concrete class ?

1148


How many bits is a string in java?

1009


What is the indent key?

1018


What do you mean by garbage collection used in java?

1048


What is polymorphism in java? What are the kinds of polymorphism?

1052


What are the different types of inheritance in java?

975


When to use runnable interface vs thread class in java?

956


What is meant by vector class, dictionary class, hash table class, and property class?

1132


What does += mean coding?

909


What are the types of exceptions?

1031


What is sortedmap interface?

972


How do you check whether the list is empty or not in java?

957