Q:

Arrays.asList().contains() giving wrong result

Code : 
private static final int[] GOOGLE_DIRECTION_ID_FOR_MATCH = { 11, 12, 13,
            14, 15 };
Log.e(TAG, "index : "
                        + Arrays.asList(GOOGLE_DIRECTION_ID_FOR_MATCH).indexOf(11));

Log.e(TAG, "contains : "
                        + Arrays.asList(GOOGLE_DIRECTION_ID_FOR_MATCH)
                                .contains(11));

Above statements logs :
index : -1
contains : false

I tried for all other values too. 

A:

Arrays#asList returns a generic type. 
One solution is to change your array to Integer instead of int:
private static final Integer[] GOOGLE_DIRECTION_ID_FOR_MATCH = { 11, 12, 13,
            14, 15 };

See this very useful link I found. 

Arrays#asList returns List<int[]> and not List<Integer> (What you wanted - Recall that there is no such a thing List<int>).  
Also, it's good to mention that if an int is boxed to Integer, then be careful.. Because for example: Integer(11) ! = 11. 

A:

Arrays.asList for int[] arg creates a List<int[]> with one element.  This is why contains dont work

