As every class extends object class and executes its default constructor ,i was wondering if is there any way to see what this object class looks like and where it exists.
Asked
Active
Viewed 52 times
-1
-
Not every class has a default constructor. Further, where the class "exists" as it were is given by the package structure. – Makoto Jul 08 '14 at 17:04
-
@makoto i mean here only object class – saurabh kumar Jul 08 '14 at 17:05
-
Have a look at the [sources](http://www.docjar.com/html/api/java/lang/Object.java.html). – blafasel Jul 08 '14 at 17:07
1 Answers
2
The JDK is developed as OpenJDK. The sourc code is available as a Mercurial repository. Object
is at
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/9bb0496deeb0/src/share/classes/java/lang/Object.java
You can also use your IDE to view the source code of every class that is shipped with source code.