I have an object Student
public class Student { String name; String[] classes; public Student(String name, String[] classes){ this.name = name; this.classes = classes; } //getter & setter } I want to filter the classes. For example, I have
Student sa = new Student("John", "math, physics") Student sb = new Student("Jack", "math, english") Student sc = new Student("Maria", "math, chemistry") So how do I get the Student with math vairable? Do I need to write a new Predicate or is there an existing method? Thank you.