Java university exercises