^The question that my question is marked a duplicate of is not the same as this one. That question is how to get a float from dividing by an integer.
This is my code:
public class Test {
public static void main(String[] args) {
System.out.println("33/5 is " + 33/5);
System.out.println("33/5.0 is " + 33/5.0);
}
}
And the output is:
33/5 is 6
33/5.0 is 6.6
Btw if this is a duplicate, please direct me to where this is answered because I was not able to find one.