(a)
// Java new Predicate(){ public boolean match(Student student){ return student.getAge() < 20 && student.getName().contains("f"); } }(b)
// C# delegate(Student student){ return student.Age < 20 && student.Name.Contains("f"); }
Example 6: (a) Java; (b) C#.