Getting started with Java and Object Oriented Programming

Hello everyone!

In this post, I will help you get started with Java Programming and a high level overview of Object Oriented Programming (OOP) with Java.

To start, you will need to choose an IDE that you are most comfortable with. An IDE is an Integrated Development Environment. It will help you write code in many programming languages (including Java). It make you work efficiently and help you find and correct errors quickly. My favorite IDE is Eclipse which is available to download from here: Enabling Open Innovation & Collaboration | The Eclipse Foundation.

For help installing and writing your first Hello World code, please refer to this video: How to Download and Install the Eclipse IDE for Java Developers and Run Hello World - Appficial - YouTube

Before we dive into high-level overview of OOP, we first need to explain what a "class" and a "method" is in Java. 

A class, some refer to it as a template and some as blueprint is where you will be writing your code and creating methods and objects within it.

A method is a set of code within a class that executes an action.

High level overview of OOP w/Java:

Abstraction: Taking only the necessary information and properties for an object. For example, an employee will have a name, last name, employee ID, and an email as these are the essential information that an employer may want to employ that employee. An employer may not add "eye color" to employee profile.

Inheritance: It simply means that you are allowed to inherit other classes along with its variables and methods.

Polymorphism: Allows you to overwrite or overload a method that you have inherited from another class.

Encapsulation: Allow you to hide code that is in a class and only share what you allow to be shared. For example, you may want to share the name of an employee but not their social security number.


These were the four concepts of object oriented programming. I have tried explaining it to the best of my knowledge, I hope it helps!


Thank you,

Smai

Comments

Popular Posts