[quote:r5dqxasl]In above program if I am using the word Static where object is created, I am getting no compilation error.[/quote:r5dqxasl]
any static method in java can only access static variables. hence i is giving an error when non static variable are tried to be accessed.
[quote:r5dqxasl]object inside public static void main function , are they static or non static by nature?[/quote:r5dqxasl]
they are static inside the main method.