By commenting out which line will the following class compile with no errors ?
class ZZY {
transient final int i = 0;
transient final static int j = 10 ;
int k = 78 ;
char jack(){
return 'a';
}
public static void main (
String args [ ]) { // ---> 1
new ZZY ( ) . jack ( ) ; // ---> line 2
int d = new ZZY ( ) . j + new ZZY ( ) . i ; // ---> line 3
new ZZY ( ) . k ; // ---> line 4
System.out.println(newZZY().i+" "+new ZZY().j);//--> line 5
}
}
In this program you have to comment line 4...
new zzy().K; In this line new ZZY() returns object of class zzy and you can access any instance variable as object.varname...
but here why we cant access it?
