I was searching around about this topic but I still don\'t get it, if someone can elaborate I would be very thankful.
My task is to divide two variables as integer d
If you are looking for the mathematical modulo operation you could use
int x = -22; int y = 24; System.out.println(Math.floorMod(x, y));
If you are not interested in the mathematical modulo (just the remainder) then you could use
int x = -22; int y = 24; System.out.println(x%y);