I would like to know how do we solve question that involve the Thread.currentThread().getId() question as how do i know wht id is going to be returned these are given in kathy sierra book thread chapter exercise questions please help really very confused...
You can't know which ID will be returned. It is an arbitraty number chosen by the JVM. What you can know is the name of the thread (in case you set this upon Thread creation).
JDBCSupport - An easy to use, light-weight JDBC framework -
I did read that we cannot know the id that will be returned then how should we select it in the options do we see the lifetime of the thread and then choose the answer or what is the way followed
Thank you for your help I found out from the question that it is answered on the basis of number of threads as no two threads can have the same id and also which one is alive or blocked Thank you
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad: