Generic Java Example