Skip to content

ramasubbaiya/java-intermediate-tutorials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Java Intermediate Tutorials

:bowtie: 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

Object Oriented Programming

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

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

About

JAVA Intermediate Tutorials

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages