Wish to have some nice time? Check out what I'm reading online!

Core Java

When can an object reference be cast to a Java interface reference?

When a Java object implements the referenced interface it can be cast to the Java interface reference.

Java interface

A java class containing all the methods as abstract is called an interface. A method that has no implementation and which is expected to be implemented by a subclass is called an abstract method. Java interface can contain constants. When an interface needs to be instantiated it should be implemented by a class and all [...]

How can you invoke a defined method of an abstract class?

An abstract class cannot be instantiated directly. An abstract class has to be sub-classed first and then instantiated. Only then the method defined in the abstract class can be invoked.

What is an abstract class?

A class containing atleast one abstract method is called an abstract class. A method that has no implementation and which is expected to be implemented by a subclass is called an abstract method. An Abstract class cannot be instantiated. It is expected to be extended by a subclass. An abstract class may contain static variables [...]

What is an abstract method?

A method that has no implementation and which is expected to be implemented by a subclass is called an abstract method.