Menu
Question Index
...

What will be the output of the following program?

public class Compare
{
    public static void main(String[] args)
    {
        Integer i1 = 1;
        Integer i2 = 1;
        System.out.println(i1 == i2);
        
        Integer i3 = -200;
        Integer i4 = -200;
        System.out.println(i3 == i4);
    }
}


true
true
false
false
true
false
false
true
Compilation Error or Runtime Error

Doubts

Problems

Topic: Creating Objects for Primitive Data Types (Byte, Short)

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App