Solved

java not 100% object oriented

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

Suggested Solutions

Title # Comments Views Activity
split53 challenge 7 79
unix in java example 9 53
GUI builder for Eclipse? 8 27
servlet example 17 10
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
The viewer will learn how to implement Singleton Design Pattern in Java.

867 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

19 Experts available now in Live!

Get 1:1 Help Now