Questions are based on JAVA: 1. Which of the following statements is true concer
ID: 3905836 • Letter: Q
Question
Questions are based on JAVA:
1. Which of the following statements is true concerning a class.
Select one:
In a class, fields can ONLY be user-defined types
In a class, fields can ONLY be primitive data types or existing java types (From existing java classes)
In a class, fields can be primitive data types, existing java types, or user-defined types
In a class, fields can ONLY be primitive data types such as int , float , etc
2. Which of the following statements are false about classes?
A. a concrete class does not have to define all of the abstract methods that it inherits from an abstract class.
B. a final class can have instances
C. a final class can be extended.
D. a final class can be implemented
E. an abstract class cannot be inherited
F. an abstract class can be extended
Explanation / Answer
NOTE: I have completed your assignment and below are the details. Please check and let me know if you have any questions. I will revert back within 24 hours.
1. Which of the following statements is true concerning a class.
Select one:
A. In a class, fields can ONLY be user-defined types
B. In a class, fields can ONLY be primitive data types or existing java types (From existing java classes)
C. In a class, fields can be primitive data types, existing java types, or user-defined types
D. In a class, fields can ONLY be primitive data types such as int , float , etc
Ans) C
Explanation:
1) A class can have fields of data types like primitive, existing java data types or user defined ones.
2) The property applies to not only variables of class but also functions of it.
2. Which of the following statements are false about classes?
A. a concrete class does not have to define all of the abstract methods that it inherits from an abstract class.
B. a final class can have instances
C. a final class can be extended.
D. a final class can be implemented
E. an abstract class cannot be inherited
F. an abstract class can be extended
Ans) A
Explanation:
1) A concrete class is a class that should implement all the methods that are inherited from abstract class.
2) So the choice A is incorrect.
3) Abstract classes are meant to be extended whereas concrete class are expected to provide implementation for all the methods inherited from abstract class.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.