Hello all, I'm a noob java guy and I need some assistance.
I'm trying to make a statement to check if a variable is inside an array. Like if strawberry is in candyArr1 array, the result would be true. Thanks.
I'm trying to make a statement to check if a variable is inside an array. Like if strawberry is in candyArr1 array, the result would be true. Thanks.
Code:
public class Candy{
public static void main (String args[]){
String[] candyArr1 = {"butterscotch, marshmallow, strawberry"};
}
}