Search:

Type: Posts; User: meowCat

Search: Search took 0.10 seconds.

  1. Replies
    5
    Views
    1,677

    Re: question on calculating

    Well, the point is not how to make it better, as this was an exam question.

    Seeing the answers now, I feel it's a bit unfair to ask that in a MC test. Ah well...thank you very much for the...
  2. Replies
    5
    Views
    1,677

    Re: question on calculating

    Hi,

    thanks for your reply. I am still confused though.
    the value of i before the confusing expression is 6.
    So I would expect something then like
    i += i
    i = 6+6
    =12
    then the increment =13....
  3. Replies
    5
    Views
    1,677

    question on calculating

    Hi everyone,

    I have this bit of code and I am really confused about the result:

    int i=5;
    if (i++ == 5 || false){
    System.out.println("before: "+i);

    i += i++;
    }
  4. Replies
    5
    Views
    1,510

    Re: How do you read this syntax?

    Hi,

    thanks to everyone for your very helpful comments.
    I hadn't seen this kind of notation before but it appeared in a practice test.

    Many thanks!!
  5. Replies
    5
    Views
    1,510

    How do you read this syntax?

    Hi everyone,

    I am preparing for a Java exam at the moment and I came across the following syntax and don't understand how to read it or what exactly it does:

    i = (j>1)?2:1;


    the whole code...
Results 1 to 5 of 5