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;
Answers were Sorted based on User's Feedback
Answer / anil kumar rai
output:5080130
a b c
concat a,b,c because its consider its as a string which
assign integer value
Is This Answer Correct ? | 21 Yes | 4 No |
Answer / 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 |
Answer / raja
This program is error.. Missing semicolon in variable
declaration... And the close Bracket of system.out.println
statement is missing...
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / swapna kumari arava
After successful compilation , The value is 5080130
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / suresh
expected semicolan(;)&
expected ")"(close breas)
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / kiranksj
a is already defined in main so it throws an error
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / suneel kumar yadav
sysntax error plz close the parenthesis)before the semicolon(;) then the ans is 5080130
Is This Answer Correct ? | 0 Yes | 0 No |
String class is defined under which package in java?
what is the main class of all the classes
primitive data types in Java ?
What is a nested structure?
What is difference between array and vector?
What is Marker interface in java? and what is clone?
Can a class have 2 constructors?
Can a class be defined inside an interface?
when everything can be done by static block then why do we use main method?.
What is meant by local variable and instance variable?
What is the default value of local and global variables?
Where to store local variables?