Prepare for the Oracle 1Z0-808 exam questions with our authentic preparation materials, including free 1Z0-808 practice exam questions and answers. TheExamsLab provides all the support you need to succeed in the Java SE 8 Programmer I 1Z0-808 exam. This dedication to student success is why we have the most satisfied 1Z0-808 certification exam candidates worldwide.
Given:
Consider below codes of 2 java files:
1. //Flyable.java
2. package com.sampleproject.oca;
3.
4. public interface Flyable {
5. static int horizontalDegree() { //Line n1
6. return 20;
7. }
8.
9. default void fly() {
10. System.out.println("Flying at " + horizontalDegree() + " degrees."); //Line n2
11. }
12.
13. void land();
14. }
1. //Aeroplane.java
2. package com.sampleproject.oca;
3.
4. public class Aeroplane implements Flyable {
5. public void land() {
6. System.out.println("Landing at " + -Flyable.horizontalDegree() + " degrees."); //Line n3
7. }
8.
9. public static void main(String[] args) {
10. new Aeroplane().fly();
11. new Aeroplane().land();
12. }
13. }
What will be the result of compiling and executing Aeroplane class?
Given:
Given the code fragments:
Consider below codes of 2 java files:
1. //Flyable.java
2. package com.sampleproject.oca;
3.
4. public interface Flyable {
5. static int horizontalDegree() { //Line n1
6. return 20;
7. }
8.
9. default void fly() {
10. System.out.println("Flying at " + horizontalDegree() + " degrees."); //Line n2
11. }
12.
13. void land();
14. }
1. //Aeroplane.java
2. package com.sampleproject.oca;
3.
4. public class Aeroplane implements Flyable {
5. public void land() {
6. System.out.println("Landing at " + -Flyable.horizontalDegree() + " degrees."); //Line n3
7. }
8.
9. public static void main(String[] args) {
10. new Aeroplane().fly();
11. new Aeroplane().land();
12. }
13. }
What will be the result of compiling and executing Aeroplane class?
© Copyrights TheExamsLab 2024. All Rights Reserved
We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the TheExamsLab.