• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JAVA is a pure OO language?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes,java is 100% pure Object Oriented Programming.

Can you write a program without a class in java?

Hope This Helps
 
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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%.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ulf and Pat ... i got it
[ August 18, 2008: Message edited by: seetharaman venkatasamy ]
 
Vijeth Konanavar Bhadrappa
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Pat Farrell and Ulf Dittmer. I got the answer.
 
Marshal
Posts: 22450
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now all you need to do is read your private messages.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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).
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
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
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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic