jeudi 24 novembre 2016

%6f = %.6f ???

jeudi 24 novembre 2016
double a = 3
System.out.printf("Achtung: %6f %.6f\n", a, a);

-------------------------------------------
Als Ergebnis wird mir folgendes geliefert:
Achtung: 3,000000 3,000000
-------------------------------------------
Erwartet habe ich jedoch:

Achtung: 3,0 3,000000

%6f = %.6f ???

0 commentaires:

Enregistrer un commentaire

 
◄Design by Pocket