*
The moose likes Beginning Java and the fly likes JAVA is a pure OO language? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JAVA is a pure OO language?" Watch "JAVA is a pure OO language?" New topic
Author

JAVA is a pure OO language?

Vijeth Konanavar Bhadrappa
Greenhorn

Joined: Jun 09, 2008
Posts: 14
Hello, Yesterday my friend asked me that Everyone say JAVA is a pure OO language but in java we are accessing the public static void main(String[] a){} outside any class and more over without creating an instance of that class containing that main()..... Still i am not getting the answer for this.. Someone help me out please..........
[ August 18, 2008: Message edited by: Bear Bibeault ]
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Yes,java is 100% pure Object Oriented Programming.

Can you write a program without a class in java?

Hope This Helps
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4637
    
    5

No, Java has too much cruft from C, which was needed to ensure acceptance.
Things like

are not OO, they are pure C.

Smalltalk is an example of a pure OO language.

Why do you ask? its usually a troll. Similar to which is a better religion: Catholic or Lutheran. There is no rational way for anyone to answer this.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
This question has no answer, unless you define what "100% OO language" is. Different people have different definitions.

It has also been asked many, many times. Please use the Search link at the top of the page to find the previous discussions.

Yes,java is 100% pure Object Oriented Programming.
Can you write a program without a class in java?

This just shows that Java is not 0% OO - it has classes. But it also has primitives that are not objects, so it's definitely not 100%.


Ping & DNS - updated with new look and Ping home screen widget
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Thanks Ulf and Pat ... i got it
[ August 18, 2008: Message edited by: seetharaman venkatasamy ]
Vijeth Konanavar Bhadrappa
Greenhorn

Joined: Jun 09, 2008
Posts: 14
Thank you Pat Farrell and Ulf Dittmer. I got the answer.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Now all you need to do is read your private messages.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Ulf Dittmer:

This just shows that Java is not 0% OO - it has classes.


Early Visual Basic had classes and was "0% OO". (As far as I remember, they called it "object based".)

One thing that makes Java "not 100% OO" is that classes aren't objects (as they are in, for example, Smalltalk).


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Gaurav Chauhan
Greenhorn

Joined: Apr 14, 2008
Posts: 27
Java is not PURE OBJECT ORIENTED LANGUAGE it is HYBRID OBJECT ORIENTED LANGUAGE.

SMALLTALK, RUBY and PYTHON are Pure OO.

In java we can use primitive types int,char which are not classes but in pure OO each and everything has to be a class or object.


Don't tell me there is nothing beyond sky, There are footprints on moon.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

But Python has built-in functions that are not part of any class. So Python is also not 100% OO.

The thing is, that there is no exact definition of what is "OO" and what is not "OO". Almost all practical programming languages have a mixture of features, and since the definition of "OO" is not exact, the idea whether a language is "100% OO" or not is a matter of opinion rather than a matter of fact.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JAVA is a pure OO language?
 
Similar Threads
Java - Pure OO?
What's This compile error?
quick class question
java pure Object Oriented language ?
Hi, All i have a small doubt