File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes OOPS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "OOPS" Watch "OOPS" New topic


Sathiya K.A

Joined: Feb 09, 2005
Posts: 2
Hai everybody,
I'm new to java and I have few doubts in OOPS concepts

Java is not purely object oriented, then why it is expecting us to write everything inside a class?

Why Arrays are object in java?What's the benefit of having it as an object?

Why global variables are not allowed in java
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199


Welcome to JavaRanch!

We have many different forums here at the Ranch. This one is devoted to programming with threads. We have others that are devoted to general Java issues. I'm going to move this to our Java beginner's forum.

[Jess in Action][AskingGoodQuestions]
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
Everything is an object except primitives. If an array were a primitive, how would you store objects in it?

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Java is not "pure" OO because it has primitives. We've had lots of discussions about what "pure" means and I for one concluded it doesn't matter and I don't care. I get paid to use Java and I'm pretty happy about that. Knowing a little about other OO languages helps me some times, but not because they are more or less "pure".

You can do pretty darned good OO with Java. The designer's decision to put all code within classes encourages us to keep trying to do better. Including an alternate structure for code outside of classes might well have a place in the world, but not in Java's.

BTW: The real answer is OO == Smalltalk because Alan Kay invented both and said so.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: OOPS
It's not a secret anymore!