Question:
Why Java is not fully object oriented?
Answer:
Java is not a fully object oriented language because it does not support multiple inheritance directly.But it does so by using theconcept of interfaces. A language is said to be fully object oriented if it supports classes,objects,inheritance and polymorphism.For example C++ supports full fledged feature of inheritance and all the types of inheritances(single,multilevel,multiple,hierarchical and multipath inheritances), and if we take the polymorphism C++ supports static binding and operator overloading which come under static polymorphism where as Java does not support operator overloading. We cannot say Java as an Object based language because it supports Inheritance and polymorphism to some extent. Where as in object based languages there are classes and objects but no inheritance and polymorphism.
Submitted by M. Sudheendra ( sudhe_m2001 @ yahoo . co . in ) Source: CoolInterview.com
whatever u told may be correct but according to u c++ is purely object oriented but we can write c++ prgrm without object.in case of java we have to create object,so i think it is purely object oriented though java may not support multiple inheritance. Source: CoolInterview.com
Answered by: Debajyoti Banerjee | Date:
| Contact Debajyoti Banerjee
whatever u told may be correct but according to u c++ is purely object oriented but we can write c++ program without object.in case of java we have to create object,so i think it is purely object oriented though java may not support multiple inheritance. Source: CoolInterview.com
Answered by: Debajyoti Banerjee | Date:
| Contact Debajyoti Banerjee
whatever u told may be correct but according to u c++ is purely object oriented but we can write c++ program without object.in case of java we have to create object,so i think it is purely object oriented though java may not support multiple inheritance. Source: CoolInterview.com
Answered by: Debajyoti Banerjee | Date:
| Contact Debajyoti Banerjee
In C++,,Without class also we can write some programs but in java every single program should be written in class so java is called pure object oriented lang,,, Source: CoolInterview.com
Answered by: rajesh | Date: 10/13/2007
| Contact rajesh
For an object oriented language everything shud be treated as object but in java primitive data types are present which protect it from being object oriented. Although java gives wrapper classes for all data types which shows its efforts in becoming fully object oriented Source: CoolInterview.com
Answered by: Deepali | Date: 2/10/2009
| Contact Deepali
1.java is not object oriented ,bcs its also support primitive data type 2. it does not support multiple inheritance directly Source: CoolInterview.com
Answered by: maheswarijothi | Date: 3/16/2009
| Contact maheswarijothi
according to me java is not pure object oriented language because it does not directly support multiple inheritence and it does not gives the output in the form of object.for ex if we add two no(3+5) it gives 8 which is not the part of class and not any object Source: CoolInterview.com
Answered by: ankita pandey | Date: 3/20/2009
| Contact ankita pandey
A pure Object Oriented Language is that which implements all the OOP concepts. Java doesn't support Multiple inheritance (it provide Multiple inheritance through interfaces it is partially implemented because interfaces can't contain method definition), Java also doesn't support Operator overloading, Thus java is not a Pure Object Oriented Language. C++ implements all the OOP concepts but in C++ a program can be written without class so it is also not Pure object Oriented. C# is the Pure Object Oriented Language. Source: CoolInterview.com
Answered by: @nupam Dixit | Date: 3/27/2009
| Contact @nupam Dixit
Java supports primitive data types such as byte, short, int, long, float, double, char & boolean. For Object oriented language everything must be declared in objectS. That's why java is not fully object oriented language Source: CoolInterview.com
Answered by: sajid sageer | Date: 5/15/2009
| Contact sajid sageer
java is not fully object oriented because it support static variable and if we are using statsic function or static variable then we cann't call that function or variable by using dot(.) or class object cause of this java is not fully object oriented language Source: CoolInterview.com
Answered by: jyoti | Date: 7/13/2009
| Contact jyoti
The real answer is that Java primitives are not objects unlike in C# where everything including what would otherwise be called primitives derives from System.Object and has public members that can be accessed through thier instances (eg int) Source: CoolInterview.com
Answered by: Abraham Kiggundu | Date: 7/23/2009
| Contact Abraham Kiggundu
Java is not fully object oriented language but it is object based language because it suppouts class, object, inheretece (does not support multiple inheritence)so, we can not say it is pure object oriented language. Source: CoolInterview.com
Answered by: Vimlesh Kumar | Date: 8/5/2009
| Contact Vimlesh Kumar
It is said tat JVM is written using pointers concepts,so its not a pure object oriented language Source: CoolInterview.com
Answered by: sachin | Date: 8/25/2009
| Contact sachin
java is not a purely object oriented because of threads, beacause thread program genrate deffrent output on different output on different computer as well as same computer after some time recompile and execute Source: CoolInterview.com
Answered by: dipendra singh panwar | Date: 9/1/2009
| Contact dipendra singh panwar
Java is not a pure OOP Magic Bullet Krishna.
And there are various reasons for it.
One obvious reason is that all users who used languages like c or or other such programming languages, would be able to easily migrate to this language.
But a deeper reason is the calculation of primitive datatypes across platforms such as int, double or byte, and its space on the native OS would be different.
Again, as per specification, java must be invoked in a 32 bit OS, but it does not specify if that OS must be OOP or not. So, an invocation to execute a java program would mean, creating an object of the class, which is directly not possible and hence the control has to be through static keywords. Thus main method is maintained with its static functionality as in c or c++.
And lastly we have the support for native calls, too in a rather non standard oop manner.
Otherwise, the differences are minimal, namely pointers (which is not an oop feature even for c++), multiple inheritance, and ambiguities.
Well, thats all I can think for now.
Hope this helps
Thanks and Regards, BABU Source: CoolInterview.com
Answered by: Babu | Date: 9/3/2009
| Contact Babu
c++ is a object oriented language but java is pure object oriented language.. Source: CoolInterview.com
Answered by: shahaji pawar | Date: 9/13/2009
| Contact shahaji pawar
Java is not a fully object oriented language because it does not support multiple inheritance directly.But it does so by using theconcept of interfaces. In C++,,Without class also we can write some programs but in java every single program should be written in class so java is called pure object oriented lang.
Source: CoolInterview.com
Answered by: prashant | Date: 9/30/2009
| Contact prashant
Well java is not purely Object oriented lang.This is because we can access a member of a class without creating an object of that class.This can be done by preceding its(member's) declaration by the keyword "static". Source: CoolInterview.com
Answered by: yashaswini | Date: 10/12/2009
| Contact yashaswini
Neither java nor C++ is pure object oriented, bcoz according OOP's everything in the language most be done with Object, but here are some primitive types that take memory, and helps for Objects. LAnguage that support Multiple type inheritence can not be fully OOP's based languge. Source: CoolInterview.com
Answered by: VEERENDRA | Date: 10/14/2009
| Contact VEERENDRA
java,c++ not fully object oriented languages because the variable cannot declared as objects.if it is fully object oriented everything must be declared as objects. for example:smalltalk is fully object oriented langugage because varibles also declared as objects Source: CoolInterview.com
Answered by: sivakrishna JNTU ananatapur | Date: 10/16/2009
| Contact sivakrishna JNTU ananatapur
According to running era object oriented means it must be able to hold class,object,inheritance & polynorphism. but java doesn't support multiple inheritance than also it is treated as o.o.l(object oriented language).because instand of multiple inheritance it supports multilevel inheritance.and multiple concept is to be handled by the multilevel Source: CoolInterview.com
Answered by: jaywant topno | Date: 10/25/2009
| Contact jaywant topno
<1>in java we create class in compile time ,while to be a fully oops language classes must be created in run time ....<2>in java int,double,char and other data types are premitive data types...while to be a fully oops language these are must be treated as objects. Source: CoolInterview.com
Answered by: ankit kumar | Date: 11/11/2009
| Contact ankit kumar
because java used premtive data type and does not support multipe inheritance. Source: CoolInterview.com
Answered by: Rakesh | Date: 11/24/2009
| Contact Rakesh
A pure Object Oriented Language is that which implements all the OOP concepts. in some cases java is a pure object oriented but in some cases java is not pure object oriented? C++,,Without class also we can write some programs but in java every single program should be written in class so java is called pure object oriented language. Java doesn't support Multiple inheritance (it provide Multiple inheritance through interfaces it is partially implemented because interfaces can't contain method definition), Java also doesn't support Operator overloading. so in second cases java is not pure object oriented .......
Source: CoolInterview.com
Answered by: HARIOM KUMAR | Date: 11/29/2009
| Contact HARIOM KUMAR
You are Totally Wrong C++ is not Pure object Oriented while Java,smalltalk are pure object oriented Languages, because can you write any java program without class ? while you can write C++ program without class Source: CoolInterview.com
Answered by: Shivkumar | Date: 11/30/2009
| Contact Shivkumar
jav is a fully objetct oriented , in c++ all code not reside on the object bt in java its there.... it also support inheritance in another manner its not matter.... Source: CoolInterview.com
Answered by: mahanthesh | Date: 12/25/2009
| Contact mahanthesh
Java is not a pure object oriented programming language becoz we can run few programs without making object..... for example:- public class Demo { public static void main(String arr[]) { System.out.println("hello"); } } Source: CoolInterview.com
Answered by: anjali gupta | Date: 12/27/2009
| Contact anjali gupta
OOPs is at the core of java. in fact all java progs are OO- this isn't an option the way that is in C++. OOP is so intergral to java that u must understand its basic principles before u can write even simple java progs. Source: CoolInterview.com
Answered by: mandeep singh | Date: 12/30/2009
| Contact mandeep singh
even though java couldn't support multiple inheritance we should accept java is pure object oriented lang. bcoz it indirectly support multiple inheritance by means of interface. but c++ not comes under the clasification of obj. oriented lang. bcoz we can write the program without using class concept. and in c++ we can declare global variable due to this feature c++ fails to satisfy encapsulation concept Source: CoolInterview.com
Answered by: v.sudhakar | Date: 1/4/2010
| Contact v.sudhakar
Java is not purely OOPL due to the following reasons: 1)The use of static keyword(Global variable) allows to invoke a method or a field without the use of an object although in pure OOPL every operation must be done through objects. 2)Primitive data types(int, char, double etc) are allowed in java. Wrapper classes are used for the same but these can no how prove java to be a hundred % pure OOPL. Source: CoolInterview.com
Answered by: manidip | Date: 1/9/2010
| Contact manidip
Java is pure object oriented language but not a fully object oriented language.because of the following reason 1.it can not directly support the multiple inheritance 2.the operator overloading concept also not supported. so the languge called oop means ir must be statisfy the encapsulation,inheritance and polymorphism.java not support inheritance and operator overloading(polymorphism). so its not a fully object oriented language. Source: CoolInterview.com
Answered by: selvam | Date: 1/10/2010
| Contact selvam
Apart from multiple inheritance, Java does not support pointer like C or C++ or any other language does.This is the main reason that Java is not fully object oriented. Source: CoolInterview.com
Answered by: Shrenik Patel | Date: 1/18/2010
| Contact Shrenik Patel
we can write C++ pro with out writing a class.java is a fully object oriented lan bcz we cont write even single program without a class Source: CoolInterview.com
Answered by: kiran | Date: 1/22/2010
| Contact kiran
According to me java only pure object oriented language, because in java all the programs must be written in class. The class concept is only on object oriented programming. When we look at the c++ we can write a program without using classes. Hence java is purely object oriented language. Source: CoolInterview.com
Answered by: marimuthu | Date: 1/23/2010
| Contact marimuthu
we can say that java is a pure object oriented language in rear case java is not a fully OO language.but c++ is not a fully OO language because in c++ we can call the function with out create object. Source: CoolInterview.com
Answered by: Akshit kumar | Date: 1/25/2010
| Contact Akshit kumar
We can say that java is better option for object oriented language than others, bcse java supports the class concept in each program but normal program of c++ can write without oops concept.so java is better than other oops language.so java is pure object oriented programming Source: CoolInterview.com
Answered by: Sumer Singh | Date: 2/16/2010
| Contact Sumer Singh
Java is inherits certain functionalities from the native languages and some are directly represented as it is.Hence Java is not pure Object Oriented language.
For Example: Java uses primitive data types as it 's represented in C,C++.
int num;
Source: CoolInterview.com
Answered by: Karthick | Date: 2/21/2010
| Contact Karthick
actully i m not taken the deffination os oop's..."Different resion of java is not pure oop's 1.java support the some concept 'C' &'c++'.like data types. 2.java does not support multiple inher.. But java support multiple inheritance in different way i.e. INTERFACES. 3.wa can run the program without creat the object.It is the main reasion.so java is not pure object oriented languag.
Source: CoolInterview.com
Answered by: JOHN ANAND | Date: 3/2/2010
| Contact JOHN ANAND
java is a also known as interpreter lang so while compilation code is converted into byte code then interpreted line by line .so it is not purely oolang Source: CoolInterview.com
Answered by: papu | Date: 3/27/2010
| Contact papu
According to c++ we can write the programs with out classes also where as in java we must write the each and every line of program inside the class only and we are also creating objects to classes.so i think java is purely object oriented however it doesnot supports multiple inheritence. Source: CoolInterview.com
Answered by: ushasri | Date: 4/1/2010
| Contact ushasri
Java is not pure oo language because it uses primitive data types which does not belong to any class.And to use they provide WRAPPER classes which implicitly convert primitive to java class type. Source: CoolInterview.com
Answered by: RAJESH | Date: 4/2/2010
| Contact RAJESH
JAVA is not a pure object oriented language because of following reasons
1. Being an object oriented language it has to support all the OOP concepts. But it doesn't support Multiple Inheritance.
2. In an object oriented language each and everything must be in form of classes and objects. JAVA uses primitive datatypes such as int, float char etc, thats why it cannot be called as pure OOL. In C# each and everything is in form of classes and objects, even int , float are also classes, thats why we can say that C# is a pure OOL. Source: CoolInterview.com
Answered by: Saurabh Saxena | Date: 4/12/2010
| Contact Saurabh Saxena
this answer is rong.java is fully object orinted language because of the following reasons. 1.java program must start with class. 2.java support the inheritence.multiple inheritence also support through interface concept. 3.java support polymorphism.java does not support dyanamic polymorphism because resources(memory) not utilizing proparly.it support dyanamic polymorphism because resources utilizing effectivly. Source: CoolInterview.com
Answered by: anilkuamr.m | Date: 4/20/2010
| Contact anilkuamr.m
Because in pure object oriented programming everything should be used only as objects , but you can also use primitive data types also in java that time java is not pure object oriented but using the wrapper classes java programs can be created pure object oriented .So java is both pure object oriented or partial object oriented . Source: CoolInterview.com
Answered by: Deepansh Dixit | Date: 4/27/2010
| Contact Deepansh Dixit
in my view java is not pure oop language b'coz of instance variable,in a pure oops everything should be access using object but instance variable r used directly Source: CoolInterview.com
Answered by: prashant | Date: 4/29/2010
| Contact prashant
As u r comparing java with C++, or C# or any other language. Your comparison can be true in case of inheritance or polymorphism. In object oriented language every thing is an object, even a method or function is also called with the help objects only, and that's java do. In case of c#'s for operator overloading , I donot think any use of it. In case of inheritance also neither c# nor java supports multiple inheritance excepts in case of interfaces. Rather c# or c++ says something about static keyword but doesnot provide any proof for that like in java. So, directly we can say that java is a complete object oriented langugae. That's all for today. See u again. Source: CoolInterview.com
Answered by: Rahul Kumar Singh | Date: 5/1/2010
| Contact Rahul Kumar Singh
you said that java is not fully oop lang. ,but it's not true because it supports all the features of oop like inheritance,polymorphism<multiple inheritance also by some extent > and by your point c++ is pure oop lang. that's wrong because it's only an oop supportive language. Source: CoolInterview.com
Answered by: mukesh singh | Date: 5/9/2010
| Contact mukesh singh
two reasons 1. it supports primitive data types 2. it does not suppor multiple inheritence Source: CoolInterview.com
Answered by: haroon rashid | Date: 5/12/2010
| Contact haroon rashid
Java is not a fully object oriented language because it does not support multiple inheritance directly Source: CoolInterview.com
Answered by: Veena | Date: 5/19/2010
| Contact Veena
java is true object oriented language.All program code & data reside within the objects & classes. Source: CoolInterview.com
Answered by: mahesh v rajpure | Date: 5/20/2010
| Contact mahesh v rajpure
every thing u told may be correct but according to u c++ is purely object oriented but we can write c++ program without object.in case of java we have to create object,so i think it is purely object oriented though java may not support multiple inheritance.
Source: CoolInterview.com
Answered by: Avdhesh Kumar | Date: 6/14/2010
| Contact Avdhesh Kumar
Java doesn't support Multiple inheritance (it provide Multiple inheritance through interfaces it is partially implemented because interfaces can't contain method definition), Java also doesn't support Operator overloading. so in second cases java is not pure object oriented every thing u told may be correct but according to u c++ is purely object oriented but we can write c++ program without object.in case of java we have to create object,so i think it is purely object oriented though java may not support multiple inheritance. Source: CoolInterview.com
Answered by: Rakesh kumar | Date: 7/16/2010
| Contact Rakesh kumar
java doesnot support integer so it is not fully object oriented. Source: CoolInterview.com
Answered by: siva(tec) | Date: 8/5/2010
| Contact siva(tec)
java is not fully object oriented language bcoz it support data primitive types..like int,char,float etc..so it is called almost pure object oriented.. Source: CoolInterview.com
Answered by: mukesh jat | Date: 8/6/2010
| Contact mukesh jat
In my opinion java is a purely object oriented language.Because it provides all the concepts of oops.Compare to C++ java does not support multiple inheritance but java support this feature using interface. C++ is not a purely object oriented language because in c++ we can write a program without create the class which is the basic concept of oops. Source: CoolInterview.com
Answered by: Laxman Sadhwani | Date: 8/19/2010
| Contact Laxman Sadhwani
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|