Solved

java not 100% object oriented

Posted on 2014-03-25
3
1,148 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

776 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