Code from assignments and projects in Java