waleed qureshi wrote:Hi - I really can't understand the relation to static here, the answer says "If c were static, then because yack is synchronized, answers
C and E would have been correct." Can anybody explain how???
static variables are class variables.. Once it has been initialized, it will be done for all the objects of that class..
This is not the case with instance variables.. So, every time you create new object, these variables are given default value for that instance..
Now analyze the problem and see whether you can relate the above two sentences with the code.