Good day all!
I am straggling to understand the output (1Z0-804 full
test number-3, question-3
JDBC)
The database table is given, and the code. What can be seen in the ResultSet object after the execution.
2. The following filter code -
3. and the following code fragment:
The table:
STUDENT:
SID NAME GPA
1 Amy 3.5
2 Bob 3.6
3 Cathy 4.1
4 David 4.3
5 Edward 2.9
So according to the filter implementation the output should be: Cathy - 4.1 AND David - 4.3
I could say I guessed the right answer, according to the input it was clear, but wanted to understand the implementation of the filter deeper, so tried the complete example provided in the question.
BUT the output from this code is not just those two: Cathy - 4.1 AND David - 4.3! Its all of them. How come? The evaluate method should return FALSE if the GPA < then provided during the construction of the filter? i.e the output should have Cathy - 4.1 AND David - 4.3 WHERE gpa > level.
I am totally confused.
Will appreciate any help.