• Welcome to NamesLot.com Domain Name Forum

    NamesLot.com Domain Name Forum offers a fully open forum to discuss domain industry news and a 0% commission marketplace for you to buy and sell domain names.

    We have reorganized our Marketplace so now it is easier to get attention to your domain while it is also easier for buyers to find the right domain name.

    If you want us to add more threads to our marketplace, please contact us! Listing on our marketplace as always, 100% free! Register NOW or Login HERE!

What is the difference between procedural and object-oriented programs in java?

hirephpexpert

New Member
I need to know difference between procedural and object oriented programs in java. How procedural programs and object-oriented programs in java.
 
A major factor in the invention of Object-Oriented approach is to remove some of the flaws encountered with the procedural approach.

Object Orientation Languages (OOL) is concerned to develop an application based on real time while Procedural Programing Languages (PPL) are more concerned with the processing of procedures and functions.

In OOL, more emphasis is given on data rather than procedures, while the programs are divided into Objects and the data is encapsulated (Hidden) from the external environment, providing more security to data which is not applicable or rather possible in PPL. In PPL, its possible to expose Data and/or variables to the external entities which is STRICTLY restricted IN OOL.
 
In procedure oriented programming it gives importance to algorithm rather than data and it follows the top-down format. Example: C

In object oriented programming it gives importance to data rather than algorithm and it follows the bottom-up format. Example: C++ & Java.
 
OOL (Object Oriented Language) is concerned with developing an application based on real time and the objects communicate via each other via functions. It usually includes Inheritance, Encapsulation and Data Abstraction, Late Binding, Polymorphism, Multithreading, and Message Passing. On the other hand, PPL (Procedural Programming Language) is more related with processing of procedure and functions. Its simply a programming in a traditional way of calling functions and returning values. JAVA, VB.NET, C#.NET are OOL languages and C, VB, Perl, Basic and FORTRAN are PPL languages.
 
The principle idea behind structured programming is as simple as the idea of divide and conquer. Procedural programming also focuses on the idea that all algorithms are executed with functions and data that the programmer has access to and is able to change.
__________________________
|
 
Various languages reflect various methods of programming. Procedural oriented programming focuses on the framework of the program whereas Object oriented programming generally focuses on data of programs. In a procedural oriented programming the approach is “Top Down” because its execution start from top to bottom. ON the other hand Object oriented programming approach way is “BOTTOM UP” because its execution start from bottom to top.
 
The difference between the two is subtle but significant.
In a procedural program, modules interact by reading and writing state that is stored in shared data structures.
In an object oriented program, modules in the form of objects interact by sending messages to other objects.
 

Members online

Forum statistics

Threads
19,802
Messages
69,805
Members
44,587
Latest member
tsscgroup
Active members today
5
New members today
1
New threads today
10
New posts today
12

Follow NamesLot on Twitter!

NamesLot proudly supported by

NamesLot proudly supported by

Top