Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public class Parrots implements Fly { private int code; public Parrots() { code = 1; } } public class Cockatiel extends Parrots{ public Cockatiel() {
public class Parrots implements Fly { private int code; public Parrots() { code = 1; } } public class Cockatiel extends Parrots{ public Cockatiel() { code = 2; } } public class Parakeets extends Parrots implements Pet{ public Parakeets() { super(); } } public class FinalExam { public static void main(String[] arr) { Parakeets p = new Parakeets(); Cockatiel C = new Cockatiel(); } } Whch one is not true about the above code? A code of p is equals to 1 (one) B p is an object of Parakeets C code of c is equals to 1(one) D c is an object of Cockatiel public class Parrots implements Fly { private int code; public Parrots() { code = 1; } } public class Cockatiel extends Parrots{ public Cockatiel() { code = 2; } } public class Parakeets extends Parrots implements Pet{ public Parakeets() { super(); } } public class FinalExam { public static void main(String[] arr){ Parakeets p = new Parakeets(); Cockatiel c = new Cockatiel(); } } Whch one is not true about the above code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started