Day 1:
OOP and Java Basics

JAVA

Introduction and Installation

  • JAVA
    • Popular
    • Widely used
    • Fast
  • Environments
    • JDK ( jre + java + javac + javadoc )
    • JRE / Java RTE (has jvm)
    • JVM

 

Installation

  • Windows
    • from oracle site (MSI install)
      https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
    • open JDK
      • Download from https://jdk.java.net/java-se-ri/8-MR3
      • Extract to C:\java\java-se-8u41-ri
      • Set PATH
        • GUI
        • CMD
          • setx -m JAVA_HOME "C:\libs\java-se-8u41-ri"
          • setx -m PATH "%JAVA_HOME%\bin;%PATH%"
  • Linux
    • sudo apt install -y update && sudo apt install -y upgrade && sudo apt -y openjdk-8-jdk-headless
      ** "installs JRE id -headless is not used"
      ** path is automatically set

Test

java -version

javac -version

JAVA

Basic Syntax and Flow

Hello Worlding

Hello Worlding

OOP

  • Classes ( prototype of object )
    • Methods ( Operations specific to class )
    • Fields ( Data )
  • Objects ( Instances of classes )
    • Autonomous Entities
    • Can be Independent
  • Follow:
    • Encapsulation
    • Abstraction
    • Inheritance
    • Polymorphism

OOP

  • Classes ( prototype of object )
    • Methods ( Operations specific to class )
    • Fields ( Data )
  • Objects ( Instances of classes )
    • Autonomous Entities
    • Can be Independent
  • Follow:
    • Encapsulation
    • Abstraction
    • Inheritance
    • Polymorphism

ENCAPSULATION

OOP

  • Classes ( prototype of object )
    • Methods ( Operations specific to class )
    • Fields ( Data )
  • Objects ( Instances of classes )
    • Autonomous Entities
    • Can be Independent
  • Follow:
    • Encapsulation
    • Abstraction
    • Inheritance
    • Polymorphism

Abstraction

OOP

  • Classes ( prototype of object )
    • Methods ( Operations specific to class )
    • Fields ( Data )
  • Objects ( Instances of classes )
    • Autonomous Entities
    • Can be Independent
  • Follow:
    • Encapsulation
    • Abstraction
    • Inheritance
    • Polymorphism

Inheritance

OOP

  • Classes ( prototype of object )
    • Methods ( Operations specific to class )
    • Fields ( Data )
  • Objects ( Instances of classes )
    • Autonomous Entities
    • Can be Independent
  • Follow:
    • Encapsulation
    • Abstraction
    • Inheritance
    • Polymorphism

PolyMorphism

OOP

Overloading vs Overriding

Overriding in a nutshell

OOP

Day 1 OOP java basics

By shraddheya shrivastava

Day 1 OOP java basics

Introduction to Java Classes and Objects Methods, Encapsulation and Conditionals Data Manipulation and Inheritance Encapsulation, Polymorphism and Abstraction

  • 54