Results 1 to 2 of 2

Thread: type object?

  1. #1
    Join Date
    Nov 2011
    Rep Power

    Default 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.


  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

    Default Re: type object?

    Does that mean as big "O" object, the mother class of all objects?
    That would be my take on the question.

    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

  1. Accessing an object from within another object from the same type in Java
    By mhasgari in forum Threads and Synchronization
    Replies: 5
    Last Post: 06-20-2011, 04:21 PM
  2. Wrap an object into another object type
    By einnhann in forum New To Java
    Replies: 7
    Last Post: 01-09-2010, 04:35 PM
  3. using instanceof to get Object type and parent type?
    By xcallmejudasx in forum New To Java
    Replies: 2
    Last Post: 11-06-2008, 06:24 PM
  4. Getting object type
    By gapper in forum New To Java
    Replies: 1
    Last Post: 01-20-2008, 08:49 AM
  5. Creating object of Type Object class
    By venkatv in forum New To Java
    Replies: 3
    Last Post: 07-17-2007, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts