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
How to create a thread in java?
Explain different types of thread priorities ?
What is mysql driver class name?
Difference between abstract and concrete class ?
How many bits is a string in java?
What is the indent key?
What do you mean by garbage collection used in java?
What is polymorphism in java? What are the kinds of polymorphism?
What are the different types of inheritance in java?
When to use runnable interface vs thread class in java?
What is meant by vector class, dictionary class, hash table class, and property class?
What does += mean coding?
What are the types of exceptions?
What is sortedmap interface?
How do you check whether the list is empty or not in java?