Lot of people while clearing the exam have done miserable in Threads and everyone is saying that threads are complicated. Could any of the SCJPs advise us exactly what type of questions are there on threads. Thanks in advance.
I did not feel that thread questions were so tough because I had studied the threads topics from the sun's site as well as from bill brogden, r&H book as well as from abhilash's site.i managed to secure 85% on threads. you need to stress on 1. wait and notify 2. multiple start commands 3. synchronized methods I can remember only these at present. [This message has been edited by ritu mengi (edited December 15, 2000).]
Hi Mahesh, I agree with Ritu , the thread questions are not that much difficult if you know the stuff very well .I've got 7 questions on threads , 4 of them had codes to analyze & other three questions stucked with the 'select true statements' type questions.I managed to get 100 % on thread because I worked hard on threads when I was studying for exam. My advise is when you find a code question on threads don't panic,just analyze the code & try to understand the concept which they going to test. In my case ,all the code questions , they simply try to check the unpredictable behaviors of threads when two threads access same data ( changing a variable ) without synchronizing.I got one question which contained 30 lines of codes (other 3 questions contained less than 20 lines), & contained two threads tried to access Two StringBuffer objects whithin the sysnchronized blocks which can arrise dead lock situation. What you can do is , use the search facility of the JavaRanch & search all the topics related to the threads & read the discussions.I'm sure you can get mamath knowledge from them.Also go the Maha Anna's Site.Maha's replies for the posts are excellent.Again most important thing is write some codes,compile,& execute & see the result.By this way you can solve most of your doubts. Most of thest people saying that threads are difficult because in any of the mock exams , they don't have the real exam type questions.Specialy synchronized codes. Also concentrate the behaviors of wait(),notify(),notifyAll(),setPrioriy() methods & the different ways you can create a thread.I got two questions on how to create a thread & one question ask how to stop a thread.(deprecated methods like stop(),suspend(),resume() were not there) So I think threads will never be difficult if you've done your home work. Cheers, Shan Karawita. [This message has been edited by Shan Karawita (edited December 15, 2000).]