Java programe from second year