Given:
class Bird {
public void fly () { System.out.print("Can fly"); }
}
class Penguin extends Bird {
public void fly () { System.out.print("Cannot fly"); }
}
and the code fragment:
class Birdie {
public static void main (String [ ] args) {
fly( ( ) -> new Bird ( ));
fly (Penguin : : new);
}
/* line n1 */
}
line n1, enables the Birdie class to compile?
Which code fragment, when inserted at
steefaand
5 months, 4 weeks agoAbdullah_Rahahleah
3 years, 7 months agoAVB22
2 years, 8 months agoRitesh_
4 years, 9 months ago