Consider the following code fragment:

Which action allows the code to compile?
- A Declare grade at line 5 instead of line 7.
- B Replace line 11 with:Predicate pred = grade -> grade == 2;
- C Declare g at line 5.
- D At line 12, replace pred.test(grade) with pred.test(g).
Community Discussion