I have been searching here for some time but haven\'t been able to find the answer to it.
I am basically required to use an array for this assignment from college. A
I presume you are wanting to check if the array contains a certain value, yes? If so, use the contains method.
contains
if(Arrays.asList(codes).contains(userCode))