Basic Terminologies in Java


Computer Program

☞It is a set of instructions(or command) to complete a specific task.

☞To write these instructions, we use a computer programming language.


Machine Language vs High Level Language


Machine Language

☞Instructions written in 0s and 1s form, is known as Machine/Binary Language.

☞This is a language that a computer can understand.


High Level Language

☞Programs are written in user-friendly language.

☞It is easy to understand.

Note : The code written in high-level language must be converted into machine language using translators(compiler or interpreter).

Compiler

☞It converts the High-level language program(Source code) into low-level language(Machine language) in one go.

Source code     →    compiler    →    object code

☞It will store the object code and used for execution.


Procedure-Oriented Language vs Object-Oriented Language


☞The high-level languages are classified into two types :

1. Procedure-Oriented
2. Object-Oriented
Procedure-Oriented Language

☞In Procedure-Oriented Programming, the stress is put on the functions or procedures(action to be taken) rather than data values.

☞Data values are not secured.


☞Data moves freely from function to function.

Example : C, BASIC, COBOL, FORTRAN, etc.


Object-Oriented Language

☞In Object-Oriented Programming, the stress is put on the data values rather than functions.

☞It allows the user to split the complete program into the number of segments called 'Objects'

☞Data values are secured.

☞Mishandling of data is protected.

Example : C++, Java, Python, etc.


Principles of Object-Oriented Programming


☞The following are the principles of OOP :

1. Data Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
Data Abstraction

☞It is defined as an act of representing the essential features without knowing the background details.


Encapsulation

☞It is the wrapping of data and functions of an object as a unit that can be used together in a specific operation.

☞It is a way to achieve data hiding.


Inheritance

☞It is a property by virtue of which one class acquires some features from another class.

☞It promotes reusability.


Polymorphism

☞The word "poly" means many and "morphs" means forms.

☞It is a concept by which we can perform a single action in different ways.