Which keyword is used to implement an interface in Java?
- abstract
- extends
- implements
- interface
In Java, the implements keyword is used to implement an interface. When a class implements an interface, it must provide concrete implementations for all the methods declared in that interface. The other options (extends, interface, abstract) are used for different purposes and are not used to implement interfaces.
Loading...
Related Quiz
- In Java, the ______ operator is used to increment a variable's value by 1.
- The method replace(oldChar, newChar) belongs to the ________ class in Java.
- How does thread priority impact the order in which threads are executed?
- The ________ method of Throwable class can be used to retrieve the description of an exception.
- ________ is an interface providing thread safety without introducing concurrency overhead for each individual read/write operation.