Kowalaholic
Kowalaholic Kowalaholic
  • 23-01-2020
  • Computers and Technology
contestada

What is the output of the following statement?
System.out.println("1 + 2\n"
+ "3 - 4\n" + "=\n" + (1 + 2)
+ "\n" + (3 + 4));

Respuesta :

Aalsharaphy
Aalsharaphy Aalsharaphy
  • 26-01-2020

Answer:

1 + 2

3 - 4

=

3

7

Explanation:

1 + 2 (it print the string "1+2" and goes to a new line

3 - 4 (it print the string "3-4" and goes to a new line)

= (it print the string "=" and goes to a new line)

3 (it perform arithmetic operation on 1+2 to give 3)

( It create empty new line)

7. (it perform arithmetic operation on 3+4 to give 7)

Answer Link

Otras preguntas

Describe the difference between ancient Egyptian and Greek views of the function of the brain.
The Romantic Movement brought new attention to capturing strong emotions, among them negative emotions like _____________________. A. loneliness and sadness B.
Solve the equation for the indicated variable. y(a-b)=c(y+a);y
how this ailments are detected prevented and treated???​
Which of the following words means "the degree to which a measurement is precise and reliable"? a. variable b. accuracy c. parameter d. constant
Urgent help please please please❤️Urgent​
f(x)= 2x^2-7+6 g(x)=4x+10 find g(f(x))
Can you guys help me with this. All you need to do is click the link. You do not need to by anything. https://www.shopfund.com/Shop?t=GS&utm_campaign=sbsha
[tex]\frac{6}{0}[/tex]
Choose the correct simplification of (9x3y2)2.