Podcast
Questions and Answers
Which of the following is NOT a primitive data type in Java?
Which of the following is NOT a primitive data type in Java?
- int
- float
- boolean
- String (correct)
What is the purpose of the 'this' keyword in Java?
What is the purpose of the 'this' keyword in Java?
- Refers to a superclass instance
- Refers to the current class instance (correct)
- Refers to an object of another class
- Refers to a subclass instance
Which of the following best describes method overloading in Java?
Which of the following best describes method overloading in Java?
- Using methods from an interface in a class
- Creating multiple methods with the same name but different parameters within the same class (correct)
- Overriding a method in a subclass to provide a new implementation
- Creating multiple methods with the same name and parameters within the same class
Why does Java not support multiple inheritance and hybrid inheritance?
Why does Java not support multiple inheritance and hybrid inheritance?
What is the main difference between an interface and an abstract class in Java?
What is the main difference between an interface and an abstract class in Java?
Flashcards are hidden until you start studying