Class work java