# Search:

Type: Posts; User: meowCat

1. ## Thread: question on calculating

by meowCat
Replies
5
Views
686

### 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. ## Thread: question on calculating

by meowCat
Replies
5
Views
686

### Re: question on calculating

Hi,

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. ## Thread: question on calculating

by meowCat
Replies
5
Views
686

### 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++;
}

by meowCat
Replies
5
Views
641

### Re: How do you read this syntax?

Hi,

I hadn't seen this kind of notation before but it appeared in a practice test.

Many thanks!!

by meowCat
Replies
5
Views
641

### 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