Is there any other rule for division in java?
As always, for such questions you should go to the Java Language Specification . In this case, the relevant section 15.17.2 :
. , n d, (§5.6.2), q, |d ⋅ q| ≤ |n|. , q , |n| ≥ |d| n d , q , |n| ≥ |d| n d .
, "" " ", : -99/50 -1. 0.
, Java , Python , , , , . . , - Python - , ( 15.17.3):
, (§5.6.2), , , (a/b)*b+(a%b) a.