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
Write a program in java to establish a connection between client and server?
What are examples of modifiers?
What is unicode full form?
What are the two ways in which thread can be created?
What is void data type?
What is meant by attribute?
Can constructor be inherited?
If a class is declared without any access modifiers, where can the class be accessed?
Is the milky way in a void?
What classes of exceptions may be thrown by a throw statement?
What is mutable object and immutable object?
Explain the difference between comparator and comparable in java?
What is use of static in java?
Why hashset is used in java?
What is the current version of java?