Category Archives: Java
Java 8 : Method References
This article contains… Method References Example of method reference When to use method reference When you can not use method reference Kind of method references
Java 8 : Lambda Expressions
This article contains… Background of Lambda Expressions, Functional interface and Vertical problem. What is a Lambda expression ? How to use lambda. Example of lambda expression. Structure of lambda expression. Type of a lambda expression. When to use Lambda ?
Java 8 : Default method in Interface
This article contains… What is Default methods ? Why Default methods ? Example of various scenarios using Default methods Default methods and multiple inheritance Behavior when extending interface.
Polymorphism in Java
This article contains… What is Polymorphism ? Reference variable types and Object Example of Polymorphism Runtime and Compiletime Polymorphism Example of both SCJP exam objective 5.2
Inheritance, IS-A and Has-A
Contents : IS-A relationship in OOP (Inheritance) Has-A relationship (Association) Different type of Association : Aggregation and Composition Example of each type SCJP exam objective 5.5
Unit 2 (Prog 6) : Inheritance in JAVA
Content : What is Inheritance ? Example of Inheritance. Reason to use Inheritance. What you can do in child class ?
Unit 2 (Prog 8) : Encapsulation in JAVA
Content : What is Encapsulation ? Difference between Information hiding and Encapsulation. How to implement : Example of Encapsulation Why we need Encapsulation ?
Unit 5 (Prog 1) : Introduction and Basics of String
In this example, you will find the basic structure and concepts of Java.lang.String with code example and description. / Java Library provide three class to handle Strings * String, StringBuffer and StringBuilder * In this section, the details and working of String class is included, however we will discuss the further parts in upcoming sections.… Read More »
Unit 3 (Prog 1) : Test Initialization of Local and Instance Variables.
In this example, you will find the details and concept of Local and class variables, initialization and their scope. /* * local variable must be initialized before attempt to use them. * Java will initialize instance variable for you !!! * Java does not give local variable a default value. */