Java SE 11 Developer (1Z0-819) — Question 172
Assuming the bodies are correct, which will result in a compilation error?
Answer options
- A. public void foo (BiFunctiorpredicate) { ... }
- B. public BiFunctionfoo;
- C. publicBiFunctionpredicate(Functiontransform) { ... }
- D. class Foo{ public Foo(BiFunctionop) { ... } }
Correct answer: A
Explanation
Option A contains a typographical error in the type 'BiFunctior' which is not a valid type, leading to a compilation error. The other options, despite their formatting issues, do not contain invalid type declarations that would prevent compilation.