hi everybody,
i have two questions here:
1. there is some code and quotations from my book:
//: c08: Destination.java
public interface Destination {
String readLabel();
} ///:~
"... what if you need to perform some constructor-like activity? "(for the inner class, they mean).
"With instance initialization, you can, in effect, create a constructor for an anonymous
inner class:
Inside the instance initializer you can see code that couldn’t be executed as part of a field
initializer (that is, the if statement). So in effect, an instance initializer is the
constructor for an anonymous inner class."
a)why i must have this parenthesis before "cost = Math.round(price);" and after "System.out.println("Over budget!");"? why it doesn't work without them?
b)if statement really can't be executed as part of a field initializer?
2.thanks to all who tried to help me with my last question (about gc). now i know that there is the option verbose:gc, but how to use it? "java -verbose Class" (a class name) works, but "java -vebose gc" - doesn't.
Sorry, it was long... And tnx in advance.
Helen
[ edited to preserve formatting using the [code] and [/code]
UBB tags and remove smilies -ds ]
[ June 30, 2002: Message edited by: Dirk Schreckmann ]