Méthode ‘printf’: Afficher seulement deux chiffres après la virgule

Author:


Download

 
public class DeuxAprVir {
  public static void main(String[] argv) throws Exception {
 
    System.out.printf("Deux chiffre apr�s la virgule: %.2f", 3.5 / 1.);
 
  }
}
//Deux chiffre apr�s la virgule