stefan has the answer.
As a more general remark, you shouldn't give the same name to a method and a member variable. This will only cause you more problems like this one in the future. Java coders prefer stuff like getXXX, setXXX, addXXX etc...
Also Java and C++ look similar in some places but there are differences, like no default parameters.
In C++ you would write:
Code:
void foo( int i = 0 ) { ... }
In Java you can't, that's why the compiler refuse to compile your code, and the Java way is to do:
Code:
void foo() { foo(0); }
void foo( int i ) { ... }
Well. At least for j2 1.4, I've heard 1.5 has syntax changes and new stuff.
Hope this heps.