[Solved] Without calling a class abstract can we implement few (not all) methods from interface? [closed]


No. A class with an incomplete implementation must be declared abstract. It cannot be directly instantiated, but it can serve as a common base for subclasses to build upon.

The point of all this is that the compiler can make sure that when a method is called on an object (as defined by the interface), the method actually exists. That is part of Java’s strong typing approach.

Java does have the notion of “optional methods”, but this is rather informal: You have to provide a dummy implementation that throws a UnsupportedOperationException.

solved Without calling a class abstract can we implement few (not all) methods from interface? [closed]