Solved

java not 100% object oriented

Posted on 2014-03-25
3
1,163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 35

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
intellij error 2 56
Java 8 to Java 6 8 43
Tomcat 9 + java 8 error while trying to deploy a war file 2 852
Java import explained 4 48
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

732 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