double h = 1/4;
System.out.println((1/4));
System.out.println(h);
Output:
0
0.0
I really don't know what to say. This exact way of dividing has always worked for me in the past. Why doesn't it work in this case? Also, (double)(1/4) and Math.floorDiv(1,4) both don't work as well I have tried that.