Solved

java not 100% object oriented

Posted on 2014-03-25
3
1,133 Views
Last Modified: 2014-04-02
Java cannot be considered 100% object oriented is due to its existence of
primitive variables  like int, long, char, float, etc.
Another reason why Java is considered not full object oriented is due to its existence of static methods and variables  Since static methods can be invoked without instantiating an object, we could say that it breaks the rules of encapsulation.                                                
Java does not support multiple class inheritance because different classes may have different variables with same name that may be contradicted and can cause confusions and result in errors. one can argue that Java is not 100% object oriented according to this point of view.

I am not clear on this.
Please advise.
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
3 Comments
 
LVL 12

Expert Comment

by:Sharon Seth
ID: 39955741
Anything specific on which you are not clear ?
0
 
LVL 35

Assisted Solution

by:girionis
girionis earned 150 total points
ID: 39956398
It's not 100% object oriented since it has primitives. The rest of the arguments in my opinion do not define object orientation.
0
 
LVL 34

Accepted Solution

by:
Gary Patterson earned 350 total points
ID: 39956617
I'd guess the one thing that most people that care about it can agree on is that in a "pure" object-oriented language, all constructs would be represented as objects.  

So, since Java implements primitive data types (byte, short, int, long, double, float, boolean, char) that are not objects, Java is not a "pure" OO language.

Once you get past that requirement, however, other characteristics of what constitutes a "pure" OO language are up for debate - mostly, they are just individual features that support the requirement that "everything is an object".

Different people that worry about these sorts of things (computer scientists, programming language designers, college professors, computer programmers with too little real work to do, etc.) have different arguments about what exactly is required in an object-oriented programming language.  And if I got paid for writing books about programming theory, or for designing programming languages, I'd care about it, too.  But I don't.  I'm an engineer, not a theoretician, so I just use the tools that result from the theories that these other guys postulate.

If you consider "encapsulation" a requirement for an OO language, then statics probably break that rule, since you don't need an instance of an object to use them.

If you consider "multiple-inheritance a requirement" for an OO language (ability to inherit from more than one class), then Java fails this test, too, since it doesn't support multiple inheritance.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now