4 Matching Annotations
  1. Last 7 days
    1. 2 % 3 the result is 2.

      line 6 supposed to print out 2 right? work 2/3 or do it in your head and its 2 lol not 3 (as remainder)

    2. When Java sees you doing integer division (or any operation with integers) it assumes you want an integer result so it throws away anything after the decimal point in the answer. This is called truncating division.

      so int/int in this case 2/3 is gon be 0 cuz we see that in mathematics : 2/3 = 0.6 repeated but this is an int value cuz 2 and 3, therefore every number after decimal would be excluded and this process is the blue

    3. evaluating the arithmetic expression on the right

      line 7: score = score + 2;

    4. it is assigning a new value to the variable on the left

      line 7: score = score + 2;