Computer Science, asked by kraghaver, 1 year ago

Consider the following code segment.

System.out.println("10 plus 20 is " + 10 + 20);

What is the output?

1. 10 plus 20 is 10

2. This snippet of code will result in a compiler error.

3. 10 plus 20 is 20

4. 10 plus 20 is 1020

5. 10 plus 20 is 30

Answers

Answered by uashenoy05
10
Heya>>>>
________________________________The output will be 4.10 plus 20 is 1020.This is because concatenation of numbers take place.

………………………................................................Hope it helps
Similar questions