Java Classes with important codes