結果 : method vs function in java