//Question :
//By commenting out which line of code can you make the class
//ZZY compile with no - compile time errors ?Consider that the
//following lines of code exist in a file called ZZY .java
interface XTC { }
class ZZY implements XTC {
public static void main (
String ka [ ] ) { // ---> line 1
ZZY z = new ZZY ( ) ; // ---> line 2
XTC x = z ; // line 3
z = x ; // ---> line 4
Object o = x ; // ---> line 5
}
};
/*
Options :
a . line 1
b . line 2
c . line 3
d . line 4
e . line 5
*/
as per me, answer is d. and its correct too as per the voodoo
exam software. But if the class=interface; assignment
on line 4 doesnt work without an explicit cast, then
hoe come the class=interface; assignment on line 5 work ?