I'm trying to check if a string is part of a 2dim array.
geefNamenCat
returns Input.readString()
. Is there any way for me to easily check if geefNamenCat
is part of TERADENWOORDEN[ ][ ]
?. I've been browsing this site for quite a while now and I have only found solutions for 1dim arrays (which I couldn't get to work either).
public void catKiezen() {
do {
String gekozenCat = geefNamenCat("\nKies 1 van de volgende categorieën: ");
}
while ( !gekozenCat.equals (TERADENWOORDEN[][])
}
Edit: I forgot to add, the do/while thing is so that it would keep asking for a new input until the given input is part of the array