ERLEDIGT
NEIN
NEIN
ANTWORTEN
2
2
ZUGRIFFE
7889
7889
EMPFEHLEN
-
02.04.07 14:48 #1
- Registriert seit
- Apr 2007
- Beiträge
- 2
Hallo
ich möchte einen int-Wert in einen String der Länge 3 umwandeln. In der Ausgabedatei soll dieser String "rechtsbündig" ausgerichtet sein.
Ich meine folgendes:
int i = "68" --> in Ausgabedatei: ' 68'
int i= "165" --> in Ausgabedatei: '165'
int i = "7" --> in Ausgabedatei: ' 7'
Ich habe dies schon probiert:
s.format("%3d", i);
Aber es kommt als Fehlermeldung:
Method is not applicable for the arguments (String, int)
Wie kann man sowas machen?
Vielen Dank
cu
Heidi
-
02.04.07 14:50 #2
- Registriert seit
- Jun 2002
- Ort
- Saarbrücken (Saarland)
- Beiträge
- 9.886
- Blog-Einträge
- 29
Hallo,
schau mal hier:
http://www.tutorials.de/forum/java/2...java-stil.html
Gruß TomJava rocks!
How to become a good Java Programmer?
Does IT in Java and .Net
The only valid measurement of code quality: WTFs / minute
Blog
Xing
Twitter
-
02.04.07 15:33 #3
- Registriert seit
- Apr 2007
- Beiträge
- 2
Vielen Dank Tom
cu
Heidi
Ähnliche Themen
-
XML Ausgabe mit XSL formatieren
Von DerGrinsemann im Forum XML TechnologienAntworten: 1Letzter Beitrag: 25.08.10, 15:55 -
Xml ausgabe formatieren
Von xxTejaxx im Forum JavaAntworten: 2Letzter Beitrag: 28.03.08, 11:22 -
Ausgabe formatieren
Von Lil-rich im Forum PHPAntworten: 2Letzter Beitrag: 31.03.07, 15:21 -
Ausgabe formatieren
Von Stiff im Forum PHPAntworten: 12Letzter Beitrag: 19.11.04, 19:33 -
mySQL Ausgabe mit PHP formatieren
Von tobi_s im Forum PHPAntworten: 5Letzter Beitrag: 18.09.02, 12:57





Zitieren

Login





