import java.util.EnumSet;
public final class EnumMeg
{
public static void main(String[] args)
{
Integer i = null;
method(i);
}
static void method(int k){
System.out.println(k);
}
}
It will compile but will throw a NullPointerException at runtime.
Responses to “What will be the result while compiling and running the code?”