dilip kumarr wrote:
kathy sierra question doubt scjp 1.6
anyone please help me solving this code..... please explain in detail, dont forget to explain code no.4 and 6
thanks in advance
it a simple code.............
donot panic for this
what
for (Days d: Days.values() ); is doing is it is putting all the values of enum into a array days............if you remove this.......ur code will also compile fine............try it...
same for
Days [] d2 = Days.values();
so,when you see d2[2]..........it will pring d2 at index 2 which is WED
Any more confusion please telllll