Why java is not 100% object oriented language??

I have not ..asked in TCS interview ..if any one have plz answer me on er.anuj.mittal@gmail.com

Showing Answers 1 - 31 of 31 Answers

ram

  • Feb 2nd, 2006
 

perhaps because, it still uses primitive types such as int. In 100% object oriented language, everything should be an object.

hope it makes some sense....

sash

  • Feb 3rd, 2006
 

another reason is that java do not fully support multiple inheritance...in one way we can say it support and in another way we say it do not support..so it can't be called a 100% object oriented language..

  Was this answer useful?  Yes

sam

  • Feb 4th, 2006
 

Actually if we go for J2EE then we find it that when we use interfaces it indirectly obeys the rule of multiple inheritence.....

  Was this answer useful?  Yes

java is purly object oriented programing language because u said that primitivr data types like int and char are used

but these int ,char and soon are the objects of class Class plase refer to api document of j2se

  Was this answer useful?  Yes

prem

  • Feb 8th, 2006
 

   Java is pure nd pure 100% Oop's based language,

 Bcoz in java every thing is an Object for Example datatypes such as int are float,

  But all this things is depending upon Wrapper class which is pre-defined classes of java for data types.

  I think so....

  Was this answer useful?  Yes

see, I thnk u have got it wrong .First of all iwould like to say that java is 100% objected oriented languages.see although its uses primitive data types but every thing ,even decalring a variable can be made object oriented.

  Was this answer useful?  Yes

ankur

  • Feb 9th, 2006
 

java was not fuly object oriented,.but then wrapper classes were introduced to make int,char etc as objects of INTEGER ,CHARACTER ETC classes,,so,,java is now considered as fully object oriented

  Was this answer useful?  Yes

pra_rec2010

  • Feb 10th, 2006
 

java is fuly Objet oriented language.

it satisfies oops concepts - Multiple inheritance is not a problem,because java satisfies inheritance.

  Was this answer useful?  Yes

goyal

  • Feb 10th, 2006
 

java is not 100%  object oriented language bcz it still uses primitive data types such as int .

  Was this answer useful?  Yes

hemadri

  • Feb 12th, 2006
 

It is clearly say that Java is not 100% oop language.I agree that one reason is primitive data types are used.

i think this is not sufficiant ans.

if u no perfectliy please give me good naswer

 

  Was this answer useful?  Yes

Ashish A

  • Feb 23rd, 2006
 

Java is not a pure Object oriented language, but so called a "Hybrid" language.

For any language to be pure object oriented it must follow these 6 points strictly...

1) It must have full support for Encapsualtion and Abstraction

2) It must support Inheritance

3) It must support Polymorphism

4) All predefined types must be Objects

5) All user defined types must be Objects

6) Lastly, all operations performed on objects must be only through methods exposed at the objects.

Now, java supports 1, 2, 3 & 5 but fails to support 4 & 6.

In java we have some predefined types as non-objects (primitive types). Although we have wrapper classes for the same but a Pure OOL can't have anything other than Objects strictly.

And regarding point 6, In java we can have communicate with objects without calling their methods for e.g. using arithmatic operators.

String s1 = "Ashish" + "A" ;

These 2 points stops java from being a pure OOL.

phani

  • Feb 24th, 2006
 

java obeys all the principles of OOAD(Object oriented analysis and design).we can?t write java program without using atleast one class or object.

  Was this answer useful?  Yes

Rakesh Khandelwal

  • Feb 25th, 2006
 

Java is not Purily 100%object oriented lang. bcoz it use Primitive data type such as int.char. . so it not 100% oops lang.

  Was this answer useful?  Yes

rajendra

  • Feb 27th, 2006
 

Java is not 100% object oriented. if java is 100% object oriented What about global variables.?

  Was this answer useful?  Yes

chandra sekhar jonnalgadda

  • Mar 6th, 2006
 

hi friends

java is not 100% object language because what about datatypes and globalvariables?

  Was this answer useful?  Yes

shriti sinha

  • Mar 21st, 2006
 

Java is not a 100 %  object oriented language because of two reason.

1.It still allows primitive data types like int , float etc.

    

  Was this answer useful?  Yes

shriti sinha

  • Mar 21st, 2006
 

java is not 100% object oriented language because of 2 reason.

1. It still permits primitive data types.

2. Static keyword. : JVM doesnot create a copy of static member for each objects of the class and We don't need to create an object of the class to access its static member.It can be accessed by using the class name and a dot operator like Class_Name.static_member.It violates "Everything is an object" concept of Java.

  Was this answer useful?  Yes

Mahesh

  • Mar 24th, 2006
 

At first,according to Balaguruswamy,Java is purely object-oriented programming language,but the answer for your question can be :If ur method is static,then no need to create the object of the corresponding class to call the static method,so in this case,Java is not 100% object-oriented programming language.

What do you think?

  Was this answer useful?  Yes

santukt

  • Apr 15th, 2006
 

Java is not pure Oo language bcoz

 1.It support static keyword that allows to access a property or method of 

    a real world entity without using objects.

 2.It is not possible to represent a mother and father to child relationship of

    concrete classes.

 3.Even if wrapper classes r there they r not flexible as primitive

     say for e.g.

      Integer c=new Integer(3)+new Integer(4);

     is not possible in java.

 4.It does not support generic programming(I think is available jdk1.5 onwards)

  Was this answer useful?  Yes

java geek

  • Apr 17th, 2006
 

In a pure Object Oriented world, everything is an object and must obey the oops concepts...Java allows us to access methods and attributes of a class without creating objects, if they are marked as static....Also, static methods are not overridden ( well, it is not an object specific behaviour anyway), which violates the polymorphism concept.eg.,,,,Animal a = new Cat();a.sound();Wouldn't it invoke sound method in the Animal class if it is static even though the Cat class has the same static method??? Also, the child classes are not able to inherit the behaviour (if it is static)...Isn't this the violation of Inheritance ?????YES JAVA IS NOT A PURE OBJECT ORIENTED LANGUAGE>>>>My 2 cents....

  Was this answer useful?  Yes

uafshahid

  • May 1st, 2006
 

Java is 100%(pure) object oriented language.

Every program starts from class(template of objects) and ends till the class scope.

  Was this answer useful?  Yes

As in C++ and some other object-oriented languages, variables of Java's primitive data types are not objects. Values of primitive types are either stored directly in fields (for objects) or on the stack (for methods) rather than on the heap, as commonly true for objects. Because of this, Java was not considered to be a pure object-oriented programming language. However, as of Java 5.0, autoboxing enables programmers to proceed as if primitive types were instances of their wrapper class.

  Was this answer useful?  Yes

Nagaraj

  • May 21st, 2015
 

java is not a 100% opp because of primitive value like int,cha....means int,cha ...all these are not object bt we can make it object by using wrapper class ex: int i=10 int it is primitive ......Integer Obj=new Integer(10); it is object

  Was this answer useful?  Yes

sayan

  • Jul 9th, 2015
 

To make primitive data types into object Java has wrapper class Auto boxing concept

  Was this answer useful?  Yes

mahee522

  • Aug 8th, 2015
 

Java is not 100% object oriented language because if we say any programming language is pure object oriented then in that every thing is an object,but in java primitive types are not objects,for these wrapper classes are invented,after wrapper classes primitives contains objects.... so now we can call it as 100% object oriented language

Code
  1. class Test

  2. {

  3. int i=10;

  4. Integer d=new Integer(10);

  5. }

  6. }

  Was this answer useful?  Yes

Ujjwal Nandi

  • Aug 19th, 2015
 

Java is a not 100% object oriented because, Java supports primitive data type such as a int, byte, long....etc.

  Was this answer useful?  Yes

Mahak

  • Aug 19th, 2015
 

Pure Object Oriented Language
A language is called PURE object oriented if It contains only objects and classes. In it we do access everything
through Message Passing. A Pure Object Oriented Language has these following characteristics, along with
four basic characteristics of Object Oriented Programming.
All predefined DATA Types are objects.
All user defined DATA Types are objects.
Data Hiding
Encapsulation
Inheritance
Polymorphism
Abstraction
on the other hand it will not called a Pure Object Oriented Language if it will contain these properties:
> Primitive Data Type
ex: int, long etc.

>Wrapper Class
ex: JAVA is not a Pure Object Oriented Language as in contains Primitive Data Types (int, long, double) and wrapper class.
Fully Object Oriented Language
A language is called FULLY object oriented if it contains all the fundamental features of object oriented programming and it can have primitive data types or not.
OO properties are:
Encapsulation
Inheritance
Polymorphism
Abstraction
Some of fully object oriented languages are, as follows:
JAVA
C#
Visual Basic
C++

  Was this answer useful?  Yes

friend

  • Sep 7th, 2015
 

Java is not purely 100% object oriented language because of two major reasons: firstly, it (till JDK 1.7) does not support multiple inheritance and secondly it supports primitive datatypes.

  Was this answer useful?  Yes

pranathi repaka

  • Feb 11th, 2016
 

Object oriented is a concept which not only deals with objects but also with other concepts like class, object, encapsulation, abstraction, message passing, dynamic binding, polymorphism and inheritance. So, if any language is said to be purely object oriented it should satisfy all the above concepts. Java doesn't support multiple inheritance directly which violates one of the concepts. Hence, its not purely object oriented language.

  Was this answer useful?  Yes

kiran

  • Mar 1st, 2016
 

Because of primitive data types, if we use Wrapper classes then Java is 100% pure object oriented.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions