how to work in java