Discussion :: Control Instructions - General Questions (Q.No.4)
|Neeraj Goyal said: (Mar 27, 2013)|
|Because here in this case only color blue object is created first then we entering in the switch case so that's why answer must be blue.|
|Bharat Bhusan Nanda said: (Sep 3, 2014)|
|color c = color.blue;.
After that the value of 'c' is 'blue'.
c = blue.
So, the output will be 'blue'.
|Vishal Daware said: (Oct 5, 2016)|
|We are using <Color.blue > so it will print color name, otherwise if it prints only blue then the answer will be 2 because Enum values start with 0 and so on.|
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.