Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Boell Fischer   on Nov 28 In Java Category.

  
Question Answered By: Cay Nguyen   on Nov 28

Your thinking is right - a switch  with a constant  required at that point would
be useless.

No, it's not meant to be a constant. The items in the "case" lines need to be
constants, of course.

Are you sure it's the switch line  it doesn't like? Compilers can get their
error messages a bit out of step sometimes.

You've obviously posted an indicative bit of code, not the real thing. I think
it might be better to post the real code.

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Java language: switch statement Or get search suggestion and latest updates.


Tagged: