OOP_1

Subdecks (2)

Cards (50)

  • OOP
    Object Oriented Programming
  • Object Oriented Programming
    • Methodology or paradigm to design a program using classes and objects
    • Simplifies software development and maintenance
  • Object
    Any real-world entity such as a pen, chair, table, computer, watch, etc. that has state and behavior
  • Object-Oriented Programming
    • Languages that uses objects in programming
    • Aims to implement real-world entities like inheritance, hiding, polymorphism in programming
  • Class
    • A blueprint from which you can create an individual object
    • A logical entity that does not consume any space
  • OOP Concepts
    • Inheritance
    • Polymorphism
    • Abstraction
    • Encapsulation
  • Java
    • One of the most popular and widely used programming language and platform
    • Fast, reliable and secure
  • Java was created
    1991
  • Oak
    Initial name of Java
  • James Gosling
    Development leader in Sun's microsystem
  • First project developed using Java
    1995
  • Characteristics of Java
    • Object-oriented model
    • Simple
    • Platform independent
    • Robust
    • Strong security
    • Portable language
    • Supports multi-threading
    • High performance
  • JRE
    The on-disk part of Java that creates the JVM
  • JDK
    Allows developers to create Java programs that can be executed and run by the JVM and JRE
  • JVM
    The Java platform component that executes programs
  • Java Source File Structure
    • Each Java source file must have the same name as a public class that it declares
    • Each Java source file can contain only one public class declaration
    • The file extension must be .java
    • The filename is case-sensitive
  • Phases of a Java Program
    1. Write the program
    2. Compile the program
    3. Run the program
  • Compilation in Java
    • Java programs are compiled into bytecode, which the JVM (Java Virtual Machine) then executes at runtime
    • Java source code is compiled into bytecode which gets saved on the disk with the file extension .class
    • When the program is to be run, the bytecode is converted, using the just-in-time (JIT) compiler, into machine code which is then executed