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).
✏️ Object class is available since Java version 1.0
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()
Have Questions? Post them here!
- Create a Zip file using Java Code programmatically
- Eclipse : A java Runtime Environment (JRE) or Java Development kit (JDK) must be available
- How to Sort a LinkedList in Java
- Loading class com.mysql.jdbc.Driver. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver
- How to declare and initialize Array in Java Programming
- [Fix] java: integer number too large compilation error
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting
- Reading .xls and .xlsx Excel file using Apache POI Java Library
- IntelliJ: Error: Could not find or load main class, java.lang.ClassNotFoundException
- How to get Client IP address using Java Code Example
- Truncate table using Java JDBC Example
- Struts 2 : There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj]
- How to get file path in Idea IntelliJ IDE
- Java Generics explained with simple definition and examples
- Java SE 8 Update 301 available with various bug fixes and security improvements
- Java: Collect Stream as ArrayList or LinkedList
- Java JDBC Connection with PostgreSQL Driver Example
- How to check if Java main thread is alive
- How to fix Java nio NoSuchFileException wile reading a file
- Java 8+ get Day of the Week Examples with LocalDateTime, DateTime, ZonalDateTime and Instant classes
- Ways to Convert Integer or int to Long in Java
- [Java] How to throws Exception using Functional Interface and Lambda code
- [Fix] Spring Boot: mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
- Java: The value of the local variable string is not used
- Java JDBC: Insert Java 8 LocalDate and Time using PreparedStatement
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python] - Python
- How to upload file programmatically to SharePoint Document Library using Server Object Model C# .Net - SharePoint
- Export aborted because fatal lint error were found - Android
- How to Enable Dark Mode Theme in Microsoft Teams - Teams
- Todays Apple Spring Loaded Event Live Updates - Apple
- Disable Chrome Notification bell from Mac OS X menu bar - Mac-OS-X
- How to Schedule Mails in macOS Ventura - MacOS
- How to track and download Microsoft Teams meeting attendance report of participants/students - Teams