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

Write a program in java to establish a connection between client and server?

511


What are examples of modifiers?

518


What is unicode full form?

559


What are the two ways in which thread can be created?

604


What is void data type?

582






What is meant by attribute?

599


Can constructor be inherited?

580


If a class is declared without any access modifiers, where can the class be accessed?

601


Is the milky way in a void?

542


What classes of exceptions may be thrown by a throw statement?

534


What is mutable object and immutable object?

632


Explain the difference between comparator and comparable in java?

489


What is use of static in java?

536


Why hashset is used in java?

540


What is the current version of java?

547