Second Java assignment