The java.lang.Object acts as a super class of every java class by default. Directly or indirectly every class is inheriting from java.lang.Object class. This class is having few methods.If needed we can override the methods in our class , or even we can use the default implementation.
The methods are :
1) getClass() :- This method returns the run time class of a particular object.
2)finalize() : – It is invoking by the garbage collector.
3)toString() :- Giving the string representation of a particular object.
4)clone() :- Returning copy of a particular object.
See more about clone() and example
5)hashCode() :- Returns the hash code (An integer value) for an object.
6)equals() :- Checks whether two objects are equals or not.
See more about hashCode() & equals()
7)wait () :-Using to synchronize multiple threads
8)notify() :-It is also using to synchronize multiple threads
9)notifyAll() :- It is also using to synchronize multiple threads
nice and thanks.
Hey there, You’ve got done an incredible job
Thanks a lot for sharing this with all people you actually know what you are speaking about! Bookmarked. Kindly also discuss with my website =). We will have a hyperlink alternate agreement among us!
thanks, nice post.
Good website! I really love how it is easy on my eyes and the data are well written. I’m wondering how I might be notified whenever a new post has been made. I’ve subscribed to your RSS which must do the trick! Have a nice day!
It’s hard to come by knowledgeable people in this particular topic, however, you seem like you know what you’re talking about! Thanks