Output for
int a=10,b=20 ; a=a+b;
b=a-b;
a=a-b; System.out.print(a+” “+b);
Answers
Answered by
0
In the sum a=10+20;then again a=30-20 then a will be 10.Hence,b=10-20 is -10 if you used double or float data type.
Answered by
0
JAVA
int a=10,b=20 ; a=a+b;
b=a-b;
a=a-b; System.out.print(a+” “+b);
Output
The value of a will be 50 and
The value of b will be 30.
- An argument supplied to println() is printed using this function. Three sections of the statement can be understood separately as follows: System: The java.lang package contains a final class definition for it. This is an instance of the System class's public, static member field of the PrintStream type.
- System.out in Java.
- One of the most often used statements is println(). You might not know much more about it than that; we use it to print the argument supplied to it and display it on the screen. In order for you to comprehend something as a programmer even better, we will examine Java System.out.println() in detail in this tutorial.
- The term "System" refers to a final class in the java.lang.package that has a static and public member field named "PrintStream."
- There is a public function called println() that is shared by all instances of the class PrintStream.
#SPJ2
Similar questions
English,
19 days ago
English,
19 days ago
Music,
1 month ago
Math,
1 month ago
Social Sciences,
9 months ago