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 destroy method?
What are format specifiers in java?
Explain the importance of thread scheduler in java?
Is java type safe?
How do you initialize an arraylist in java?
Can private class be inherited in java?
Explain yield() method in thread class ?
Can a function return a function?
Explain the importance of finally over return statement?
How to change the priority of thread or how to set the priority of thread?
Give the hierarchy of inputstream and outputstream classes.
What are loops in java? What are three types of loops?
What is class forname used for?
What is null object in java?
How to make a write-only class in java?