結果 : how to create a generic function in java