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;

Answers were Sorted based on User's Feedback



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 / anil kumar rai

output:5080130
a b c
concat a,b,c because its consider its as a string which
assign integer value

Is This Answer Correct ?    21 Yes 4 No

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

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 / bina kar

The value is 5080130

Is This Answer Correct ?    11 Yes 1 No

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 / bala

no manju 5080130 is correct

Is This Answer Correct ?    5 Yes 0 No

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 / s.padma prabhu

Answer is :: 5080130

Is This Answer Correct ?    6 Yes 1 No

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 / raja

This program is error.. Missing semicolon in variable
declaration... And the close Bracket of system.out.println
statement is missing...

Is This Answer Correct ?    1 Yes 0 No

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 / swapna kumari arava

After successful compilation , The value is 5080130

Is This Answer Correct ?    1 Yes 0 No

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 / suresh

expected semicolan(;)&
expected ")"(close breas)

Is This Answer Correct ?    2 Yes 2 No

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 / kiranksj

a is already defined in main so it throws an error

Is This Answer Correct ?    0 Yes 0 No

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 / suneel kumar yadav

sysntax error plz close the parenthesis)before the semicolon(;) then the ans is 5080130

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the effect of keeping a constructor private?

0 Answers  


Difference between association, composition and aggregation?

0 Answers  


How can you set an applet’s height and width as a percentage?

0 Answers  


What about main thread in java?

0 Answers  


Brief the life cycle of an applet.

1 Answers  


What’s the difference between applets and standalone program?

0 Answers  


Explain the difference between jdk, jre, and jvm?

0 Answers  


How many threads can I run java?

0 Answers  


write a program to create an vector and listeterator.and value should be enter through keyboard.

1 Answers   Axcend,


What is class forname used for?

0 Answers  


explain the life cycle of thread?

10 Answers   CTS, NIIT, TCS,


What is the byte range?

0 Answers  


Categories