?
Solved

java not 100% object oriented

Posted on 2014-03-25
3
Medium Priority
?
1,182 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 600 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 1400 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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

766 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