Java: Helpful Tips on Navigating Java Installation
What is Object-Oriented Programming (OOP)?
Object-Oriented Programming (OOP) is a programming paradigm that organizes software design around objects and data instead of functions and logic. Below are some key concepts and features of object-oriented programming. OOP has two major concepts that are the foundational concepts applied in code that enable us to build applications: class and objects.
Class: A user-defined data type that consists of data members and member functions that can be accessed/used by creating an instance of that class (GeeksforGeeks, 2023).
Objects: A basic unit of OOP that represents real-life entities and an instance of a class. (GeeksforGeeks, 2023).
The four main principles of Object-Oriented Programming are encapsulation, inheritance, polymorphism and abstraction (Dusch et al., 2023).
Encapsulation bundles data (variables) and methods (functions) together in a class, which ensures that the internal state of an object is hidden from the outside world. Access to the object's data is usually restricted to methods. It also helps maintain data integrity and promotes modularity by isolating components.
Inheritance allows a class to inherit properties and behavior from another class. It promotes code reuse and establishes hierarchal relationship between classes. Subclasses can extend or override the functionality of their parent classes.
Polymorphism is the ability of objects to take on multiple forms. It can be achieved through method overriding and overloading. Method overriding allows a subclass to provide a specific implementation of a method in its superclass. Method overloading involves having multiple methods with eh same name but different parameters.
Abstraction hides complex implementation details and exposes only relevant information. It allows developers to create abstract classes or interfaces that define a set of methods without stating how they are implemented.
References
Download and Install Java Development Kit (JDK) on Windows, Mac, and Linux. (2023, May 21,). GeeksforGeeks. Retrieved Apr 11, 2024, from https://www.geeksforgeeks.org/download-and-install-java-development-kit-jdk-on-windows-mac-and-linux/
Dusch, B., Yang, C., Dinh, C. & theeguru. (2023, November 9,). General | Programming Paradigms | Object-Oriented Programming. Codecademy. Retrieved Apr 11, 2024, from https://www.codecademy.com/resources/docs/general/programming-paradigms/object-oriented-programming
Overview of JDK Installation. Oracle Help Center. Retrieved Apr 11, 2024, from https://docs.oracle.com/en/java/javase/22/install/overview-jdk-installation.html

Comments
Post a Comment