Link to home
Start Free TrialLog in
Avatar of bt1942
bt1942

asked on

One more question of Number of parameters

Hi

As you can see the code, if the question asks you to write down the numbers of parameters and return type.

The answer would be

Number of parameters: 2 (String & double)
Return type: rentHouse ? (I'm not sure)

Thanks.

Thanks.
public boolean rentHouse(String address, double weeklyRent, House rentedHouse)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of manuel_m
manuel_m
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bt1942
bt1942

ASKER

manuel_m // Ok I see, so the return type is boolean?
Avatar of bt1942

ASKER

manuel_m // Oh ok my mistake.
Avatar of bt1942

ASKER

manuel_m // if they are same like (int day, int month, int year) do you count this as 1 or 3?
Avatar of bt1942

ASKER

Thanks for the comment.
> if they are same like (int day, int month, int year) do you count this as 1 or 3?

The count is 3 !

You always have to count all the parameters given in a method. It doesn't matter what type they are :-)