finish java samples for basics.md