java Class uselesssness