In Java, if a class implements an interface and does not provide implementations for all its methods, it must be declared as ________.
- Abstract Class
- Concrete Class
- Final Class
- Static Class
When a class in Java implements an interface but doesn't provide implementations for all the interface methods, it must be declared as an abstract class. This is because an abstract class can have unimplemented methods, while concrete classes need to provide implementations for all interface methods they inherit.
Loading...
Related Quiz
- Which interface or class should a class use or extend to create a new thread in Java?
- The ________ interface provides methods to retrieve the meta data of the database such as its structure (tables, schemas), the user on the connection, etc.
- What is the major drawback of Linear Search compared to other searching algorithms?
- How does Binary Search perform when there are multiple occurrences of the search key in the data?
- Which of the following classes is used to write characters to a file in Java?