• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Object Oriented Programming

 
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to all,
for Such nice and satisfying answers.


 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Whatever. Here's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic