CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.




Get it now !!
Send your Resume to 6000 Companies

Search Interview Questions

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 )



Category Java Interview Questions & Answers - Exam Mode / Learning Mode
Rating (4.0) By 141 users
Added on 1/5/2010
Views 7901
Rate it!
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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) 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 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 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.

Post your answer here

Inform me about updated answers to this question.
Related Questions
View Answer
Why does not support multiple Inheritance?
View Answer
What it the root class for all Java classes?
View Answer
What is polymorphism?
View Answer
Suppose If we have variable ' I ' in run method, If I can create one or more thread each thread will occupy a separate copy or same variable will be shared?
View Answer
In servlets, we are having a web page that is invoking servlets username and password. which is cheks in the database, Suppose the second page also. If we want to verify the same information whether it will connect to the database or it will be used previous information?
View Answer
What are virtual functions?
View Answer
Write down how will you create a binary Tree?
View Answer
What are the traverses in Binary Tree?
View Answer
Write a program for recursive Traverse?
View Answer
What are session variable in Servlets?
View Answer
What is client server computing?
View Answer
What is Constructor and Virtual function. Can we call Virtual funciton in a constructor?
View Answer
Why we use OOPS concepts, What is its advantage?
View Answer
What is the middleware. What is the functionality of Webserver?
View Answer
Why Java is not 100 % pure OOPS?
View Answer
When we will use an Interface and Abstract class?
View Answer
What is an RMI?
View Answer
How will you pass parameters in RMI. Why u serialize?
View Answer
What is the exact difference in between Unicast and Multicast object. Where we will use?
View Answer
What is the main functionality of the Remote Reference Layer?
View Answer

Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

View All Java Interview Questions & Answers - Exam Mode / Learning Mode




India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.03125 Seconds