0
You got something wrong!
Under the java lesson, basic concepts, in primitive operators, the third question says that 15/4 = 3. I just tried random numbers until I got it, but it was kinda annoying
2 ответов
+ 7
That is correct.
15 divided by 4 yields 3 with a remainder of 3.
15/4 is a integer division, so the remainder is ignored.
You can actually look at the lesson comments for explanations after getting that right.
+ 1
15/4=3.75 but integer storing only non decimal parts of result.
int i = 15 / 4; // 3
double d = 15.0 / 4.0; // 3.75
System.out.println(i);
System.out.println(d);