Archive

Posts Tagged ‘key points’

Things one has to know about Interfaces in Java

The following article is mainly focused at beginners who are not much familiar to Java. It can also be a quick recap tool for Java Developers.

What are Interfaces?

Interfaces are 100 percent abstract classes i.e it defines only abstract methods and constants. But while an abstract class can define both abstract and non-abstract methods, an interface can have only abstract methods. Interfaces can be implemented by any class from any inheritance tree.

Why do we need Interfaces?

Interfaces help in implementing “Multiple Inheritance” the Java Way. Now what exactly does it mean by “Multiple Inheritance”? The Multiple Inheritance, one in C++, is allowing a particular class to extend/inherit from more than one class. Multiple Inheirtance can be quite messy and lead to deadly situation at times.

Read more…

Advertisements