Interfaces

Java private abstract Method with Example

An abstract class is permitted to have both concrete and abstract methods. In abstract class, no method (either concrete or abstract) can be private. The reasons are very simple and when known looks as of common sense. Let us make a list to remember. Abstract methods in an abstract class cannot be private but can …

Java private abstract Method with Example Read More »

What is interface in Java with realtime Example?

Java interface realtime examples Summary: By the end of this tutorial "Java interface realtime examples", you know what is interface with realtime examples. Java interface realtime examples Interface differs from abstract class in that interface contains only abstract methods. All methods should be public and abstract; if just omitted by the Programmer by style, Java …

What is interface in Java with realtime Example? Read More »

Why Java interface required A full discussion with Example?

For better knowledge of Java interface, the explanation is given in Questions/Answers form, an easy way to understand fast. 1. What is an interface in Java? a) An interface contains only abstract methods (not even one concrete method). b) It differs from abstract class in that abstract class can contain concrete methods also. 2. Can …

Why Java interface required A full discussion with Example? Read More »

Can you create interface reference variables?

interface reference variables It is stated in my earlier posting Can you create instance of interface? that we cannot create objects of interfaces but possible as an inner class. Now the present question is can we create interface reference variables and if permitted what is the use of these reference variables as interface does not …

Can you create interface reference variables? Read More »

Java Made Clear: Difference between Abstract class Interface

Difference Abstract class Interface Summary: By the end of this tutorial" Difference Abstract class Interface", you will be comfortable to their differences. Introduction A novice feels why both abstract class and interface are required in Java as an abstract class can contain all abstract methods also. The main difference just on the face is Interface …

Java Made Clear: Difference between Abstract class Interface Read More »

Multiple Interfaces Implements Java

Summary: At the end of this tutorial, you will be comfortable with Multiple Interfaces Implements usage. Looks difficult at the beginning, but put some patience and start reading. Do some small programs to understand still better. This is required for a Developer. Any doubts may be forwarded to me. As Java does not support direct …

Multiple Interfaces Implements Java Read More »

Extend Multiple Classes Java

Extend Multiple Classes Java Summary: At the end of this tutorial you will understand the usage of Extend Multiple Classes Java in the code. We know earlier that Java does not support multiple inheritance but supports partially through interfaces. After extends there must be only one class of either concrete (non-abstract) or abstract. After implements …

Extend Multiple Classes Java Read More »

Abstract class constructor and Interface abstract

These are two different concepts which can be explained easily by a novice having a little bit knowledge of abstract classes and interfaces. It is advised to read abstract classes before going through this topics. It gives thorough understanding of abstract classes where some concepts you may not aware of, perhaps. Before going further let …

Abstract class constructor and Interface abstract Read More »

Interfaces Multiple Inheritance Java

We know earlier, Java does not support multiple inheritance, basically. But to support multiple inheritance, partially, Java introduced "interfaces". An interface is not altogether a new one for us; just it is a special flavor of abstract class where all methods are abstract. That is, an interface contains only abstract methods. Syntax of multiple inheritance …

Interfaces Multiple Inheritance Java Read More »