This question already has an answer here:
I want to know the difference between
System.out.print((double)1/2); System.out.print((double)(1/2));
The first answer I got was 0.5, but the second one gives 0.0 . Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire