Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Is java fully OOPS??

 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yesterday evening myself and my friend had small discussion.

Our discussion are here

Friend : Whether java is fully OOPS?
I : No
F : Why
I: Because there are 3 things which violate OOPS concept
1 Java contains datatypes which arenot objects
2 java doesnot support Multiple inhertance
3 java doesnot support Operator Overloading
F(she quoted me the following lines from java API)


public final class Class
extends Object
implements Serializable

Instances of the class Class represent classes and interfaces in a running Java application. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions. The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects.



I : How about 2nd and 3rd ones?
F : OOPS required to support for inhertance and Overloading.Not specifically to Multiple Inhertance and Opertor Overloading??
I :

Now i confused Whether arguments given by her are Correct or Not??
If she is not correct what are facts in it?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question is asked on the forums here every now and then; you are not the first one who's asking it.

The answer is that there is no formal, exact definition of what object oriented is and what it is not. There is no exact list that you can go through to decide if a programming language is "fully OO" or not.

So there is no simple "yes or no" answer to the question.

My personal opinion is that your friend is wrong if he/she thinks that multiple inheritance and operator overloading are things that are required before you can call a language fully OO.
 
author
Posts: 4323
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java is not pure OOP because it allows primitives (long,double,int,short,etc).

As for the rest, as Jesper said its all a matter of interpretation.
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Java is not pure OOP because it allows primitives (long,double,int,short,etc).



But the Java API quotes are


Instances of the class Class represent classes and interfaces in a running Java application. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions. The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects.

 
Scott Selikoff
author
Posts: 4323
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The primitive types are classes, but the values are not classes nor objects. You can call int.class but cannot do any such things to the values.
[ June 16, 2006: Message edited by: Scott Selikoff ]
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No matter how you choose to define "OOPS" ...

cout << "I'm glad Java doesn't allow operator overloading";
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic