Introduction to the Object Class
The Object class from java.lang package is the root class of all classes in Java Programming Langauge. All classes have the Object class as its Superclass (Parent class).
How to view the Object Class Code?
You can find the Object.class file in the core API rt.jar (Java Runtime Environment), If you use IDE like IntelliJ or Visual Studio Code, you can make use of the built-in decompiler.
Using IntelliJ:
- Right Click on the Object keyword in a file and select Go To -> Implementation (s)


You can also make use of decompilers or view the code online http://www.docjar.com/html/api/java/lang/Object.java.html.
List of Methods in Object.java class

There are 12 methods available in the Object class. The methods from the Object class are available for all classes that we create. Out of these 12 methods, 7 methods are of type native - they are defined and executed using code written in another programming language native to the Operating System (mostly C Langauge)
- private static native void registerNatives();
- public final native Class<?> getClass();
- public native int hashCode();
- protected native Object clone();
- public final native void notify();
- public final native void notifyAll();
- public final native void wait(long timeout);
- public boolean equals(Object obj)
- public String toString()
- public final void wait(long timeout, int nanos)
- public final void wait()
- protected void finalize()
Facing issues? Have Questions? Post them here! I am happy to answer!
- Java equals method - Tutorial
- Unbound classpath container: JRE System Library [JavaSE-1.7]
- Spring Boot: @RequestBody not applicable to method
- Java 8: Steam map with Code Examples
- Java Program: Random Number Generator
- Java java.time.Clock class code examples [Java Date Time API]
- Fix: type argument is not within bounds of type-variable T
- [Fix] java.net.MalformedURLException: unknown protocol
- Java 7 addSuppression() and getSuppression() Exception Handling
- Convert Java Array to ArrayList Code Example
- How to Word-Warp Console logs in IntelliJ
- Ways Compare Dates in Java Programming with Examples
- Remove Trailing zeros BigDecimal Java
- CRUD operations in Spring Boot + JDBC
- [Java Threads] Should we extend Thread Class or implement Runnable interface
- Json Serialization and Deserialization using Java Jackson
- Create simple struts2 project using maven commands
- How to install Java OpenJDK 11 on Alpine Linux
- Unsupported major.minor version 52.0 in java
- Error: Can not find the tag library descriptor for
- Java: Convert String to Binary
- How to run Java Unit Test cases with Apache Maven?
- Java: Testing Private Methods in JUnit using reflection API Example
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting
- Java Join Strings with Comma Separator
- Installing MongoDB on Linux/Unix/macOS/Ubuntu - MacOS
- How to remove or unstage a file from git staged area - Git
- How to Recover Deleted Messages on iPhone - iOS
- Fix: Jupyter Notebook Black Web Page on Localhost - Python
- Linux Remove or Delete Files and Directories using Terminal Commands - Linux
- Android : Unable to load VM from snapshot : Mac OS X Error - Android
- How to Clear Gradle Cache on Mac - Gradle
- Java + Spring JDBC Template + Gradle Example - Java