Liste des formats des nombres en virgule

Author:

 int,string,static, list, list, java
{filelink=10}

public class FormatFloat
{

  public static void main(String[] args)
  {
    System.out.printf("Décimal:                  %fn", Math.PI);
    System.out.printf("Décimal/Scientifique:     %gn", Math.PI);
    System.out.printf("Décimal/Scientifique:     %Gn", Math.PI);
    System.out.printf("notation Scientifique :   %en", Math.PI);
    System.out.printf("notation Scientifique :   %En", Math.PI);
    System.out.printf("Hexadécimal Minuscule :   %an", Math.PI);
    System.out.printf("Hexadecimal Majuscule :   %An", Math.PI);
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *