O'Reilly logo

OCA Java SE 8 Programmer Study Guide (Exam 1Z0-808) by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A

Mock Exam 1

The following are questions for the first mock exam. Each question may have more than one correct answer. Each of the questions also shows which exam topic it relates to.

Question 1 (7.1. Describe inheritance and its benefits)

The keyword extends can be used

 

A.  to create a subclass from another class

B.  to create a subinterface from another interface

C.  to make a class implement an interface

D.  to make an interface implement another interface

Question 2 (6.3. Create and overload constructors; including impact on default constructors)

Given the following class

 

class RocketScience {

    public String description;

    public String getDescription() {

       return description;

    }

}

Which of the following statements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required