Kindly check the below code, This is showing some warning,
ArrayList<String[]> may not contain objects of String
ArrayList<String[]> mName = new ArrayList<>();
mValue = "John";
if (!mName.contains(mValue)) {
String[] details = new String[]{"Driver", "Part-time"};
mName.add(details);
}
if (!mName.contains(mValue)) {it contains String Arrays, so how can this work?ListofString[]can't haveStrings? the error tells you exactly what is wrong, read it