hi,
I tried INT1 = 100 and INT2 = 0. The condition clause fails I assumed the println statement would not be executed. INT1 and INT2 could be any integer values. What am I missing?
About Question enthuware.ocajp.i.v7.2.963 :
Moderator: admin
-
- Posts: 16
- Joined: Wed Feb 25, 2015 8:52 pm
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.963 :
Since INT1 and INT2 can be any two integers, the code should produce the same output for any values. Not just INT1=100 and INT2 = 0.
-
- Posts: 16
- Joined: Wed Feb 25, 2015 8:52 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.963 :
I bobbled it! thanks for your patience.
-
- Posts: 32
- Joined: Fri Oct 16, 2015 4:33 am
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.963 :
The question is clear, but it would be good to add "(INT1 < INT2)" after "INT1 and INT2 can be any two integers" for more clarity. Because if we use vice-versa (INT1 = 3 and INT2 = 1) the result of option 1, option 2, option 3 and the orginal code are same: no output
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.963 :
INT1 and INT2 can be any numbers. Not just INT1<INT2. So even if some code snippets produce the same output for INT1>INT2, you need to check whether they do so for INT1<INT2 as well before selecting them as correct options.
-
- Posts: 32
- Joined: Fri Oct 16, 2015 4:33 am
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.963 :
Oh, you are right, it have to be consistent for both case
Who is online
Users browsing this forum: No registered users and 15 guests