Java HomeWork Parameter&Return Function