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
What is the full meaning of java?
What is the difference between static and global variables and also define what are volatile variables?
What is collection api?
What is the nested interface?
What is the use of a copy constructor?
Why packages are used?
Explain about join() method?
What are different types of multitasking?
What about static nested classes in java?
What are thread local variables?
Explain about strings in java?
Can we override private methods?
explain what is transient variable in java?
What is the integer of 16?
Define canvas?