some code fragment when learn java