{filelink=4423}
import java.util.Formatter;
public class Justification {
public static void main(String args[]) {
Formatter fmt = new Formatter();
// Justifier à droit
fmt.format("|%10.2f|", 250.2352);
System.out.println(fmt);
// Justification à gauche
fmt = new Formatter();
fmt.format("|%-10.2f|", 250.2352);
System.out.println(fmt);
}
}
/*
| 250,24|
|250,24 |
*/
A Voir sur le même Sujet:
- décalage droite perl chaine
- affichage justification nombre java
- java.mesexemples.com+exemple-de-justification-des-caracteres-a-gauche-et-a-droite
- justification gauche en java
- format java gauche
- decalage caractere droite gauche javascript
- script pour afficher panel de la droite vers la gauche java
- public class droite
- orientation droite gauche excel java
- modele des justifiction de registre d apple