Sample codes for learning java