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
10 months, 3 weeks agoAbdullah_Rahahleah
4 years agoAVB22
3 years, 1 month agoRitesh_
5 years, 2 months ago