Well, It has nothing to do with coding.
We can simply understand it by solving basic maths.
As we know:
Dividend / Divisor == > we get 2 Answers
Quotient and Remainder
If the Remainder is 0, the Dividend is completely divided by Divisor
with parts of Quotient.
As in your suggested example,
1/10 actual Answer is 0.1 which is a float,
In your Java code, you must be looking for the integer value, which practically is not possible.
And obviously, 1%10 will give you 1,
as 10 as divisor can not divide 1 as a dividend.
You can try it with a float variable. I hope you will get your expected results.