public class Abc
{
public static void main(String args[])
{
def obj=null;
obj.method();
}
}
class Def
{
void method()
{
System.out.println("class def->>> method()");
}
}
The output of this code is generating a NullPointerException and why?