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.
|