Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes Object Oriented Programming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Object Oriented Programming" Watch "Object Oriented Programming" New topic
Author

Object Oriented Programming

Prash Singh
Ranch Hand

Joined: Aug 23, 2009
Posts: 103

Dear all,

What do we actually mean by OOP?
and what are the other languages related to objects , such as object based language?

And what do we mean by fully object oriented?
Is java fully object oriented?

Please reply

Thanks in Advance
Max Rahder
Ranch Hand

Joined: Nov 06, 2000
Posts: 177
If you do an Internet search on "object oriented programming" you'll find lots of good explanations. Here's one from Wikipedia:
http://en.wikipedia.org/wiki/Object_oriented_programming
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

There are a *lot* of OO languages, some using object systems differently than Java (JavaScript/Self, for example, are prototype-based, CLOS is multimethods, etc.)
Is java fully object oriented?

This depends on who you ask. In my opinion, not really. The example I use is the Arrays utility class; in a "more complete" OO language these would be part of an array class. This is endlessly arguable--I generally don't get involved and let people decide on their own :)
Max Rahder
Ranch Hand

Joined: Nov 06, 2000
Posts: 177
Another "un-OO" aspect of Java is that it has primitives. Because of that, you need to say "i == k" in some contexts, and "i.equals(k)" in others. Do I *like* Java? Yeah. Have I used more pure OO languages? Yeah.
Prash Singh
Ranch Hand

Joined: Aug 23, 2009
Posts: 103

Thanks to all,
for Such nice and satisfying answers.


Embla Tingeling
Ranch Hand

Joined: Oct 22, 2009
Posts: 237
Prash Singh wrote:
What do we actually mean by OOP?
and what are the other languages related to objects , such as object based language?

And what do we mean by fully object oriented?
Is java fully object oriented?


OOP means that the language supports a class concept, a unit of encapsulation which allows you to define your own types, and that variables declared using those types hold data in the form of objects. In addition to encapsulation an OO language should support inheritance and polymorphism. Inhertance is a way of composing new types from other types. Polymorphism comes in essentially four forms: coercion, overloading, subtype and generics.

Object based means that objects have the form of records used to store data. Examples are C and Pascal. It can also mean an OO programming style which reduces objects to records. Objects aren't asked to do things, they're merely used to hold data which is shuffled in and out.

Full OO usually means that "everything is an object". In that sense Java isn't full OO because it has primitives and static methods and the keywords aren't objects. And there is no definition of what full encapsulation, inheritance and polymorphism actually would mean so "full" is a moving target really.

In my view Java is enought OO for any practical purposes. Making it "fuller" wouldn't necessarily improve it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object Oriented Programming