Java 8 OCA Chapter 1 questions and answers

preview_player
Показать описание
.Java 8 OCA Chapter 1 questions and answers
Course
Java OCA
Institution
Java OCA
Java 8 OCA Chapter 1 questions and answersJava 8 OCA Chapter 1 questions and answers What is the output of the following code? (Choose all that apply) 1: interface HasTail { int getTailLength(); } 2: abstract class Puma implements HasTail { 3: protected int getTailLength() {return 4;} 4: } 5: public class Cougar extends Puma { 6: public static void main(String[] args) { 7: Puma puma = new Puma(); 8: Sln(TailLength()); 9: } 10: 11: public int getTailLength(int length) {return 2;} 12: } A. 2 B. 4 C. The code will not compile because of line 3. D. The code will not compile because of line 5. E. The code will not compile because of line 7. F. The code will not compile because of line 11. G. The output cannot be determined from the code provided. - Answer C, D, E
.
.
.
.
.
.
.
.
Рекомендации по теме