What keyword is used to extend a class in Java?
- extends
- implements
- inherits
- subclass
In Java, the extends keyword is used to indicate inheritance and extend a class. When a class extends another class, it inherits all the members (fields and methods) of the parent class, allowing you to create a subclass that inherits and extends the functionality of the superclass.
Loading...
Related Quiz
- Consider a scenario where a very large number of string concatenation operations are being performed in a single-threaded application. Which class would be appropriate to use for string manipulation, and why?
- Which sorting algorithm uses a divide-and-conquer strategy to sort data?
- The ________ method is used to move the thread into the Ready/Runnable state.
- How can you securely serialize and deserialize objects to protect sensitive information during the process?
- The FXMLLoader class is utilized to load ________ files.