import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        var l = new long[] { 1L, 2L, 3L };
        for (var b : new boolean[] { true, false }) {
            var a = b ? (Long)l[0] : null;
            var o = b ? (Object)l[0] : null;
            System.out.println(b + ", " + (a instanceof Long) + ", '" + a + "'");
            System.out.println(b + ", " + (o instanceof Long) + ", '" + o + "'");
        }
    }
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: