Constructors

AP Computer Science A· difficulty 3/5

A typical class has its constructor declared

  • A

    public (so external code can construct objects)

    check_circle
  • B

    private (always)

  • C

    protected

  • D

    static

Explanation

Public constructor enables instantiation outside the class.

Want 10 more like this — adaptive to your weak spots?

Related questions