Results 1 to 2 of 2
Thread: type object?
- 12-10-2011, 10:26 AM #1
Member
- Join Date
- Nov 2011
- Posts
- 47
- Rep Power
- 0
type object?
I was hoping someone could clarify a review question for me. The question is: "what is the advantage and what is the disadvantage of writing code that deals with objects as type object?" What does that mean? Does that mean as big "O" object, the mother class of all objects? I don't understand the question. I know none of you are omnipotent beings, but I would welcome any hypothesis you may have.
Thanks,
- 12-10-2011, 11:20 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 17
Re: type object?
Does that mean as big "O" object, the mother class of all objects?
To look for positive reasons for wanting to deal with objects qua Object instances a good place to start would be the Object API documentation - which defines the sorts of things you can do with them that way.
The reasons for not doing so (ie for dealing with objects via variables and expressions of some more specific type) amount to the reasons for having a type system.
Similar Threads
-
Accessing an object from within another object from the same type in Java
By mhasgari in forum Threads and SynchronizationReplies: 5Last Post: 06-20-2011, 05:21 PM -
Wrap an object into another object type
By einnhann in forum New To JavaReplies: 7Last Post: 01-09-2010, 05:35 PM -
using instanceof to get Object type and parent type?
By xcallmejudasx in forum New To JavaReplies: 2Last Post: 11-06-2008, 07:24 PM -
Getting object type
By gapper in forum New To JavaReplies: 1Last Post: 01-20-2008, 09:49 AM -
Creating object of Type Object class
By venkatv in forum New To JavaReplies: 3Last Post: 07-17-2007, 04:33 PM
Bookmarks