i
Understanding Requirement: Why Java
Why Java is important to the Internet
Java On Linux
First Java Program
Java Virtual Machine Architecture
Class Loading Process by Class Loaders
Role Of Just In Time Compiler
Execution Engine
Data Types
Variables
Arrays
Operators
Arithmetic Operations
Shifting Operators
Logical Operators
Control Statements
Object Oriented Paradigms
The Three OOP principles
Looping Statements
JAVA Class Fundamentals
Command Line Arguments
Static Initialize
Creating an Object
Instance Variable Hiding
Overriding and Overloading of methods
Understanding The Access Controls
Nested And Inner Classes
Dynamic Method Dispatching
Abstract Classes
Using Final To Prevent Overriding & Inheritance
Garbage Collection
Defining a package
Understanding Classpath
Access Protection
Importing packages
Defining and Implementing An Interface
Abstract classes vs Interfaces
Generics
Annotations
Varargs
Foreach
Fundamentals Of Exception Handling
Types Of Exceptions
Learning exception handling, try-catch, multiple catch clauses
Nested Try Statements
Throw, Throws and Finally
Custom Exceptions
Java Thread Model
Creating A Thread
Context Switching
Synchronization: Methods And Statements
Inter-thread Communication
Encapsulation is one of the OOP main principles. It is wrapping or binding code and data into a single unit. We can imagine a medical capsule, this is one of the example of encapsulation in which different medicines are wrapped. A java class is an example of encapsulation. Java bean is the fully encapsulated class as it has all the data members private.
Inheritance is the OOP principle which allows the children classes to use the properties and methods from parent classes. Inheritance helps us to make our code reusable. It is also used to achieve runtime polymorphism.
Another main OOP principle is polymorphism. To say shortly, it is when one task can be done in different ways. In Java, in order to achieve polymorphism we use method overloading and method overriding. Any Java object that can pass more than one IS-A test is considered to be polymorphic. In Java, all Java objects are polymorphic since any object will pass the IS-A test for their own type and for the class Object. Let’s revisit the example:
In this example Deer class is polymorphic as it has multiple inheritance. All IS-A tests are passed here:
A Deer is a Animal
A Deer is a Vegetarian
A Deer is a Deer
A Deer is a Object
Don't miss out!