at line marked as 1 , compiler complains as variable k might not have been initialised I don't understand why?? if k is not visible to case 3 block , it should have given the error... variable k undefined. And if it is visible (in scope on case 3 block) then k is initialised , then why the the copiler complains... thanx in advance. Rashmi
posted 15 years ago
k would be initialized only the switch statement hits the case2 and k is a local variable so it does not get initialized auto. ------------------ Have a nice day, Unless you've made other plans.