ICSE Class 10 Computer Applications Question 21 of 26

Operators in Java — Question 21

Back to all questions
21
Question

Question 21

Determine the output of the following program.

public class Test
{
    public static void main(String[] args) 
    {
        int a = 1, b = 2;
        System.out.println("Output1: " + a + b);
        System.out.println("Output2: " + (a + b));
    }
}
Answer