Question
Java Consider the following class declaration: public abstract class MyClass { private int x; private int y; public MyClass() { ... } // default constructor
Java
Consider the following class declaration:
public abstract class MyClass { private int x; private int y;
public MyClass() { ... } // default constructor ... }
Which of the following statements about MyClass is true?
A. The statement MyClass obj = new MyClass(); will create an instance of MyClass.
B. A program that uses MyClass must have at least one class that is a concrete subclass of MyClass.
C. More than one instance of MyClass can be created in a client program.
D. An abstract class cannot have instance variables.
E. MyClass must have a parameterized constructor to initialize x and y.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started