Exit 1Z0-815 Java SE 11 Programmer I
Question 1 of 5
0% complete
Q1 Multiple choice

Given:

Which two allow a.Main to allocate a new Person? (Choose two.)

Select all that apply.

  • A

    In Line 1, change the access modifier to private
    private Person() {

  • B

    In Line 1, change the access modifier to public
    public Person() {

  • C

    In Line 2, add extends Person to the Main class
    public class Main extends Person {
    and change Line 3 to create a new Main object Person person = new Main();

  • D

    In Line 2, change the access modifier to protected
    protected class Main {

  • E

    In Line 1, remove the access modifier Person() {

Previous Next