Blogger

Delete comment from: InstanceOfJava

Anonymous said...

A Mistake in the post:

We cannot call interface's default methods using interface. we have to make instance of the implemented class and then using the instance ref var, we can call the interface's default methods.

error at:
Java8Interface.display(); calling using interface name //

Correction:
obj.display(); //is correct.

Regards,
Bandham

Apr 20, 2018, 12:43:44 PM


Posted to Java 8 Interface Static and Default Methods

Google apps
Main menu