Created by Rama
π Lesson 1 : Recursion
π Lesson 2 : Collections And ArrayList
π Lesson 3 : LinkedList
π Lesson 4 : List to Array
π Lesson 5 : Collections sorting and replacing
π Lesson 6 : Collections Copy and Fill
π Lesson 7 : Frequency and Disjoint
π Lesson 8 : Stacks, push, pop
π Lesson 9 : Queue
π Lesson 10 : HashSet
π Lesson 11 : Generic Methods
π Lesson 12 : Implementing Generic Methods
π Lesson 13 : Generic Return Types
π Lesson 14 : Part 1 - Threads
π Lesson 14 : Part 2 - Threads Call
A - Abstraction
P - Polymorphism
I - Inheritance
E - Encapsulation
####ABSTRACTION
- Focus on essentials/idea rather than specific details/events
- Ignore the irrelevant or unimportant
Abstract Class
- May or may not contain abstract methods (Eg- method without body:
public void get();
) - But, if a class have at least one abstract method, then the class must be declared abstract.
- If a class is declared abstract it cannot be instantiated.
- To use an abstract class you have to inherit it from another class, provide implementations to the abstract methods in it.
- If you inherit an abstract class you have to provide implementations to all the abstract methods in it
π Lesson 15 : Abstract Class
A class which extends an abstract class and defines every method in it is called concrete class
Abstract Method
π Lesson 16 : Abstract Method
####POLYMORPHISM
- Many Forms/Behaviour
- It is of two types
- Static Binding - Compile time polymorphism
- Eg: Method Overloading
- Dynamic Binding - Runtime polymorphism
- Eg: Method Overridding
- Static Binding - Compile time polymorphism
Method Overloading
- Same Method name
- Different parameter
- Different behavior
π Lesson 17 : Method Overloading
Method Overriding
- Same Method name
- Same parameter
- Different class
π Lesson 18 : Method Overriding
Constructor Overloading
- Same Constructor
- Different parameter
π Lesson 19 : Constructor Overloading
####INHERITANCE
- Code reuse - efficient method
- One class acquires the properties (methods and fields) of another Class
extends
is the keyword used to inherit the properties of a class
π Lesson 20 : Polymorphism
####ENCAPSULATION
- Process of wrapping code and data together into a single unit
- Variables of a class is hidden from other classes, and can be accessed only through the methods of their current class [Data hiding]
- To achieve encapsulation in Java
- Declare the variables of a class as private.
- Provide public setter and getter methods to modify and view the variables values.
- Benefits
- The fields of a class can be made read-only or write-only
- It provides you the control over the data
π Lesson 21 : Encapsulation
####INTERFACE
- Collection of abstract methods
- Writing an interface is similar to writing a class. But a class describes the attributes and behaviors of an object. And an interface contains behaviors that a class implements.
- How it varies from a class
- You cannot instantiate an interface
- An interface does not contain any constructors
- All of the methods in an interface are abstract(by default its public abstract)
- An interface can extend multiple interfaces
π Lesson 22 : Interface
π Lesson 23 : Final Keyword
- Example for variable, method and class
π Lesson 24 : Anonymous Class and Object
Added Collections tutorial