![]() |
![]() |
|
|
|||||||
| Programmierung Rat & Tat für Programmierer |
|
|
Themen-Optionen | Ansicht |
|
|
#7 |
|
Inventar
![]() Registriert seit: 06.04.2001
Alter: 44
Beiträge: 2.343
|
Code:
import java.text.*;
public class runden {
double zahl = 1234.56789;
DecimalFormat df;
public runden() {
df = new DecimalFormat("#0.00");
System.out.println(zahl);
System.out.println(df.format(zahl));
System.out.println(df.parse(zahl).doubleValue());
}
public static void main(String[] nix) {
new runden();
}
}
runden.java [12:1] cannot resolve symbol symbol : method parse (double) location: class java.text.DecimalFormat System.out.println(df.parse(zahl).doubleValue()); ^ 1 error Errors compiling runden().
____________________________________
"Life is like a box of rockets," said the Marine. "You never know what you´re gonna ret." Then he pulled the trigger of his BFG9000. |
|
|
|
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|