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 bifunction in java?
How do you escape sequences in java?
What are exception handling keywords in java?
What is a substitution variable?
Is list ordered in java?
What is the purpose of using java.lang.class class?
Can we create an object of static class in java?
How does multithreading take place on a computer with a single cpu in java programming?
Can an arraylist be empty?
What is OOP Language?
What is the purpose of garbage collection in java?
What is meant by local variable and instance variable?
What is string value?
What restrictions are placed on method overriding in java programming?
What is an off by one error in java?