Here is the thing. I have a character array as follows..

```
char[] modes = new char[] { 'm', 'q', 'h', 'y' };

```

Now I want to provide the user with the option to enter a character. If it exists in the `modes` array, I'll do the necessary. For that I used...

```
//to take a character as input
mode = input.next().charAt(0);
//now to check if the array contains the character
boolean ifExists = Arrays.asList(modes).contains(mode);

```

But strangely `ifExists` returns `false`. 

1. Any Ideas where am I doing wrong?
2. If this is a bad way of doing it, please suggest a way.