Understanding Object-Oriented Programming Fundamentals in Java

Day 2 - Understanding Object-Oriented Programming (OOP) Today, I explored the fundamentals of Object Orientation. Orientation simply means the way of looking at something also known as perspective. When we look at the world as a collection of objects, that perspective is called Object Orientation. Core Rules of Object Orientation: 1️⃣ The world is a collection of objects 2️⃣ Every object belongs to a class 3️⃣ A class is imaginary, while an object is real In Object-Oriented Programming, type = class. Each object consists of two main parts: ✔ State & Properties – handled using data types ✔ Behavior – handled using methods or functions Example: Consider a Car: Has Part (State/Properties): name, cost, mileage Does Part (Behavior): start(), accelerate(), stop() To access these properties and behaviors, we create and use objects. Main Method in Java The main method is the entry point of any Java program it’s where execution begins. It has a specific signature that must be followed: public static void main(String[] args) public → accessible from anywhere static → JVM can call it without creating an object void → no return value main → method name String[] args → command-line arguments 🖥 System.out is used to print output on the screen. TAP Academy #ObjectOrientedProgramming #Java #OOPConcepts #LearningJourney #ProgrammingBasics #SoftwareDevelopment

  • graphical user interface

To view or add a comment, sign in

Explore content categories