Different simple Java samples