Practice programs in Java