Java —- 100% OO Language

5 pts.
Tags:
Java
Object-oriented programming
How java is 100% Object Oriented Language?

Answer Wiki

Thanks. We'll let you know when a new response is added.

This is the best way I can sum it up:

OOP emphasizes making the programming language fit the constraints of the representation.

Think of a bike (it is an object). It has many parts bolts, screws, chains, bars, etc. It has many functions. In Java you would program with the intent to model those functions.

You have your main Bike class, under it methods for turning, which in turn call methods or variables for parts. Essentially Java is a big tree of objects which is made up of objects, and they are made of objects, and so on and so forth. Programming in OOP allows you to define everything in an object: colors, size, shape, details, any thing at all, and then call the entire thing, with a single call. So although a bike may have 200 parts, ONE object is called.

———— jjohannsen

According to an article I found, Java is not purely object oriented because it does retain some procedural elements in its structure. My opinion is that the article is referring to the possibility to create a single Java class that executes as a program with a main(String[] args) method by default, and that there exist some primitive variable types in Java that are not represented as Objects in the language (e.g. int, long, char, etcetera). However, there are Object representations of all primitive types in Java that allow for pure OOP implementations (e.g. Integer, Long, Character).

Here is a link to the article: Object Oriented Programming

In my experience, OOP is a practice and a discipline, and can be used effectively or abused equally effectively in many different programming languages. Java lends itself well, mainly because it implements the following four basic principles of OOP, and because everything, at its basic level, is treated as an Object in the language with the exception of some primitive variable types as mentioned above.

OOP has four basic principles:

Encapsulation – Hide the implementation details behind accessors (getters) and mutators (setters).

Abstraction – Representation of the attributes and behaviors of a real-world “thing” using a coded class or object.

Inheritance – Implements the “is a” relationship between one object and another.

Polymorphism – Allows a method with the same name to have different signatures and return types.

The primitive data types make Java no-pure Object Oriented language.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following