代码 :
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));
以上语句日志:
index : -1
contains : false
我也尝试了所有其他值。