OOPS Programs
Classes, objects, inheritance, polymorphism, encapsulation and abstraction.
Encapsulation Example in Java
Encapsulation explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
Interface Example in Java
Interface explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
Method Overloading Example in Java
A Class has multiple methods of the same name with different parameters is called Method overloading. A Java example with source code and sample output.
Method Overriding Example in Java
Method Overriding explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
Function or Method Overloading with Different Data Type in Java
Function or Method Overloading with Different Data Type explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
Run Time Polymorphism Example in Java
Run Time Polymorphism explained in Java, with a complete example program, its sample output, and a clear code walkthrough.
Compile Time Polymorphism Example in Java
Polymorphism is the provision of a single interface to entities of different types. A Java example with source code and sample output.
Abstract Class Example in Java
An abstract type is a type of a nominative type system which cannot be instantiated directly. A Java example with source code and sample output.
Lambda Expression Example in Java
Learn Java lambda expressions with functional interfaces, syntax rules and a runnable example using Runnable, Comparator and a custom functional interface.
Java Generics Example in Java
Learn Java generics with type-safe ArrayList and a generic Box class. Covers type parameters, benefits over raw types and sample output.