Java - What is the output instanceof operator

What is the output of the following code?

Description

What is the output of the following code?

public class Main{

  public static void main(String[] args) {
    Boolean bool = false;
    System.out.println(bool instanceof Boolean);
    
    int[] a = {1,2,3,4};
    Integer[] aa = {1,2,3,4};
    System.out.println(aa[0] instanceof Integer);
  }
}


Click to view the answer

true
true

Related Topic