Results 1 to 2 of 2
  1. #1
    christina is offline Member
    Join Date
    Jul 2007
    Posts
    39
    Rep Power
    0

    Default Can I set a range in case statement?

    How to put a range in the case?
    For example:
    Java Code:
    case 1 to 4: 
    break;
    case 5 to 7:
    break;
    how can I do that?
    is it possible?

  2. #2
    Seemster is offline Member
    Join Date
    Jul 2007
    Posts
    55
    Rep Power
    0

    Default

    you wouldn't want to use the case statement for this. a simple if statement would work.

Similar Threads

  1. String Title case
    By bugger in forum New To Java
    Replies: 6
    Last Post: 01-31-2012, 01:21 PM
  2. Case Based Reasoning
    By kbyrne in forum Advanced Java
    Replies: 4
    Last Post: 04-12-2008, 08:51 PM
  3. problem with operator in case
    By jimJohnson in forum New To Java
    Replies: 2
    Last Post: 03-21-2008, 08:22 PM
  4. Replies: 1
    Last Post: 08-07-2007, 06:13 AM
  5. Statement or Prepared Statement ?
    By paty in forum JDBC
    Replies: 3
    Last Post: 08-01-2007, 04:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •