If your only goal is to make the code compile you can do either one:
- Remove code at //2
or
- Change //3 to: Function<Integer, Integer> f = x->x+(int)(x*rate);
No need to do both.
When you do both you're changing the logic. If rate equals 0, for instance, you'd be multiplying payment by 0 and not by 0.1 like before.
About Question enthuware.ocpjp.v8.2.1866 :
Moderators: Site Manager, fjwalraven
-
- Posts: 3
- Joined: Thu May 12, 2016 4:28 am
- Contact:
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1866 :
That is why the problem statement says, "... when applied independent of each other ....".
HTH,
Paul.
HTH,
Paul.
-
- Posts: 3
- Joined: Thu May 12, 2016 4:28 am
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1866 :
I see, ok, yes. There's nothing wrong with it then. You can delete my question if you like.
Who is online
Users browsing this forum: No registered users and 7 guests