Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

switch type  RSS feed

 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Answers b and c are correct. But why a is incorrect?

Someone please explain.
 
shetal bansal
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the maximum value a byte can take is 127, so the switch case which have values greater than 127(e.g 200,300) will give compilation error.
[ June 22, 2005: Message edited by: shetal bansal ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!