Hi,
I am struggling to understand why the loop will never be encountered?
also I am correct in saying that this is bad practice to assert input value of a public method?
Thanks.
About Question enthuware.ocpjp.v7.2.1590 :
Moderator: admin
-
- Site Admin
- Posts: 10386
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1590 :
That is because the loop condition is i>0 but i is -4.ETS User wrote:Hi,
I am struggling to understand why the loop will never be encountered?
Yes, it is indeed a bad practice to check input parameters of a public method. But this question is not testing you on that concept. It will be covered in detail in other questions.also I am correct in saying that this is bad practice to assert input value of a public method?
Thanks.
HTH,
Paul.
Who is online
Users browsing this forum: No registered users and 5 guests