Integer division stored in a double
Predict the outputEasyJava only
public class Main {
public static void main(String[] args) {
double d = 7 / 2;
System.out.println(d);
System.out.println(7 / 2.0);
System.out.println((double) 7 / 2);
System.out.println((double) (7 / 2));
}
}
Graded by exact match. Spaces at the ends of lines and blank lines at the end do not count.
to answer and keep your progress. Reading is free for everyone.