java code for class