Java and C++: NB