Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2013
    Location
    Wisconsin, USA
    Posts
    60
    Rep Power
    0

    Default Is the Object Class imaginary?

    I'm reading chapter 9 in my book, which talks about inheritance. According to the the book, the concept of the Object Class says:

    "The Java API has a class named Object, which all other classes directly or indirectly inherit from."

    What does this mean? Is the Object Class supposed to be another level above the Super Class in class chaining?

  2. #2
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    United States
    Posts
    3,380
    Rep Power
    5

    Default Re: Is the Object Class imaginary?

    The Object class is not imaginary. If you have the source code you can look at it. Also, the JDK API shows all of its methods.

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  3. #3
    Join Date
    Jul 2013
    Location
    Wisconsin, USA
    Posts
    60
    Rep Power
    0

    Default Re: Is the Object Class imaginary?

    Quote Originally Posted by jim829 View Post
    The Object class is not imaginary. If you have the source code you can look at it. Also, the JDK API shows all of its methods.
    You mean the source code in this place:

    Is the Object Class imaginary?-whereisobjectclass.png

  4. #4
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    United States
    Posts
    3,380
    Rep Power
    5

    Default Re: Is the Object Class imaginary?

    I have no idea what 'that place' is. The source code for the Object class is in the src.zip file that is associated with the JDK.

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  5. #5
    Join Date
    Jul 2013
    Location
    Wisconsin, USA
    Posts
    60
    Rep Power
    0

    Default Re: Is the Object Class imaginary?

    Quote Originally Posted by jim829 View Post
    I have no idea what 'that place' is. The source code for the Object class is in the src.zip file that is associated with the JDK.
    It's the netbeans project source folder. I guess what I'm trying to get at is 'how concerned should I be about the so-called Object Class'? I'm a 5th semester student, and today is the first time I ever even heard about the Object Class.

  6. #6
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,755
    Rep Power
    7

    Default Re: Is the Object Class imaginary?

    Wow!

  7. #7
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    United States
    Posts
    3,380
    Rep Power
    5

    Default Re: Is the Object Class imaginary?

    I could try and explain it but I couldn't do any better than this.

    Object as a Superclass (The Java™ Tutorials > Learning the Java Language > Interfaces and Inheritance)

    You may also want to read the rest of the tutorials and try out the examples.

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

Similar Threads

  1. Replies: 3
    Last Post: 05-02-2011, 04:37 AM
  2. Replies: 1
    Last Post: 02-02-2011, 06:11 PM
  3. Replies: 2
    Last Post: 06-22-2010, 04:29 AM
  4. 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
  •