{"id":3694,"date":"2016-05-15T23:01:07","date_gmt":"2016-05-15T17:01:07","guid":{"rendered":"https:\/\/mcqacademy.com\/en\/mcq\/which-of-the-following-will-not-directly-cause-a-thread-to-stop\/"},"modified":"2016-05-15T23:01:07","modified_gmt":"2016-05-15T17:01:07","slug":"which-of-the-following-will-not-directly-cause-a-thread-to-stop","status":"publish","type":"mcq","link":"https:\/\/mcqacademy.com\/en\/mcq\/which-of-the-following-will-not-directly-cause-a-thread-to-stop\/","title":{"rendered":"Which of the following will not directly cause a thread to stop?"},"content":{"rendered":"","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","topic":[107],"subject":[16],"education_level":[],"class_list":["post-3694","mcq","type-mcq","status-publish","hentry","topic-threads","subject-java-programming"],"mcq_note":"<strong>Option A is correct.<\/strong> <code>notify()<\/code> - wakes up a single thread that is waiting on this object's monitor.\r\n\r\n<strong>Option B is wrong.<\/strong> <code>wait()<\/code> causes the current thread to wait until another thread invokes the <code>notify()<\/code> method or the <code>notifyAll()<\/code> method for this object.\r\n\r\n<strong>Option C is wrong.<\/strong> Methods of the InputStream class block until input data is available, the end of the stream is detected, or an exception is thrown. Blocking means that a thread may stop until certain conditions are met.\r\n\r\n<strong>Option D is wrong.<\/strong> <code>sleep()<\/code> - Causes the currently executing thread to sleep (temporarily cease execution) for a specified number of milliseconds. The thread does not lose ownership of any monitors.","mcq_options":[{"right":"yes","answer":"<code>notify()<\/code>"},{"right":"no","answer":"<code>wait()<\/code>"},{"right":"no","answer":"InputStream access"},{"right":"no","answer":"<code>sleep()<\/code>"}],"multi_answers":"no","subject_terms":[{"id":16,"title":"Java Programming","slug":"java-programming"}],"topic_terms":[{"id":107,"title":"Threads","slug":"threads"}],"_links":{"self":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/mcq\/3694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/mcq"}],"about":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/types\/mcq"}],"author":[{"embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/comments?post=3694"}],"wp:attachment":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/media?parent=3694"}],"wp:term":[{"taxonomy":"topic","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/topic?post=3694"},{"taxonomy":"subject","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/subject?post=3694"},{"taxonomy":"education_level","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/education_level?post=3694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}