Search:

Type: Posts; User: Json

Search: Search took 0.07 seconds.

  1. Replies
    7
    Views
    2,718

    Re: Convert from 'C' to "java" (switch)

    What Chris said indeed and my second code block is relevant to just that, Java wont accept numbers into boolean.

    And also the switch statement will not take a long, it can take any number that is...
  2. Replies
    7
    Views
    2,718

    Re: Convert from 'C' to "java" (switch)

    Hello!

    First off, in Java you're not allowed to use booleans in switches. I guess this is because there is no point really, either its true or its false.

    So what you want to do is a simple if...
Results 1 to 2 of 2