Example codes for Core Java