Method Overloading is used to increase the readability of the program. Q3 What is the difference between Method Overriding and Method Overloading in Java? It contains static constants and abstract methods. In simple words, Interface is a blueprint of the class. finalize(): this method is invoked by garbage collector just before the object is garbage collected. notifyAll(): wakes up all the threads, waiting for this object's monitor. notify(): wakes up the single thread waiting for this object's monitor. wait(): causes the current method to wait until another thread calls notify() or notifyAll() method.į. toString(): this method returns the String representation of the given object.Į. hashCode(): this method returns the hash value of the object.ĭ. equals(): this method is used to check whether objects are equal.Ĭ. clone(): this method is used to create a clone of the objectī. Q1 List down methods present in the Object class?īelow are the important methods present in the Object class:Ī. Java Interview Questions for 2 to 3 Years Experience Let's dive deep into the interview questions with answers. I have added many links in the article so that it will be helpful for you to get a detailed explanation of the question. I have categorized the interview questions into topics such as the OOPs concept, Collection framework, Exception Handling, String, Serialization, Java Multi-threading, and Coding basic questions. Relax, the expectation from the 2 to 4 years experienced guy is not the same as for senior java developers. In this post, I will be sharing the most frequently asked java interview questions for 2 to 4 years experienced.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |