Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Java Programming Language Interviews:Advanced JavaCore JavaEclipseFull Stack Developer (Java)HibernateIBM WebSphereInternationalization LocalizationJ2EEJ2MEJ2SEJavaJava ANTJava AppletJava BeansJava ClassesJava EJB ProgrammingJava Game DeveloperJava GUI FrameworkJava JNDIJava JNIJava JSP ProgrammingJava Message Service (JMS)Java Multi-ThreadingJava Networking - Sockets and RMIJava PatternsJava SecurityJava Server FacesJava Servlet ProgrammingJava Software EngineerJava Swing ProgrammingJava TechnicalJava ThreadsJava Transaction APIJava Web ServicesJavaMailJBossJDBCJMSJSFPortal and PortletRMISpring FrameworkSr.Java Web DeveloperStrutsSunOneSwing AWTSWT JFace
Copyright © 2018. All Rights Reserved
Java Classes Interview Question:
What is the significance of wait() method with respect to Object class, not in Thread class?
Submitted by: Administratorthe wait() method is defined in the java.lang.OBject() class and not in the java.lang.Thread()class. it's signature is public static void wait(). we do have some overloaded versions of the wait() method. when an wait method is called by an thread on a object it release the lock on the object and goes to an WAIT/BLOCKED state inorder to let the other threads to enter the RUNNING state. However it regains the Lock on the object after sometime when it moves from the WAIT/BLOCKED state to RUNNABLE state . that can happen due to the call of notify(),notifyAll() methods by other threads holding of the respective objects Lock.
Submitted by: Administrator
Submitted by: Administrator
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.