java base code examples