Polymorphism in Java

Learn polymorphism in java with examples. You should have clear concept of polymorphism, types of polymorphism, method overloading, constructor overloading and method overriding. Compile time and run time polymorphism.  Polymorphism in Java Polymorphism is one of the oops principles of java. It is a concept where one name can have many forms. It can be…

Read the full article

Java Method Overriding

Method overriding java examples using base and child class relationship, interface and abstract class with explanation. We’ll learn how a child class can use base class behaviors / methods and override some of them in child class if don’t want to use base class methods without removing the methods from base class. [Method Override definition–…

Read the full article

Method Overloading in Java

Learn method overloading in java with simple example. Method Overloading Having multiple methods with same name in java programming is known as Method overloading. It is also known as compile time polymorhism in java. In other word, a class has multiple methods with same name. For example, below class “Paint” has three methods with same…

Read the full article

Java Constructor overloading

Learn constructor overloading in Java with simple coding example and uses. Constructor Overloading In java programming, constructor overloading means, a class can have more than one constructors with different number of parameters or with different data types. Before moving further, recommend to read below topic. Constructor having parameters in java. Multiple constructors in java. We…

Read the full article

Interface Extends Interface in Java

Learn how an interface extends interface in java with example. Also, example of Interface Extends Multiple Interface in Java program is included. Interface extends interface in java An interface can inherit or say, can extends another interface or other multiple interfaces in java programs. We will understand them by code example. but, before that you…

Read the full article

Interface methods in Java

Learn all about methods in interface in java with very simple code example and explanation. Interface in java contains only declaration of methods as shown below in interface example. All the methods in an interface are by default public and abstract and they cannot have definition or implementation. Even though, if you don’t write public…

Read the full article

Interface variables in Java

Learn Interface variables in Java with example and Uses. You know that an interface can contains methods in java, similarly, an interface can contains variables like int, float and string too. In an interface, variables are static and final by default. All variables in an interface in java should have only public access modifier. For…

Read the full article