Different Java samples