public static boolean arrayEquals ( List < String > a , List < String > b ) { if ( a == null ) { a = new ArrayList <> ( ) ; } if ( b == null ) { b = new ArrayList <> ( ) ; } if ( a . size ( ) != b . size ( ) ) { return false ; } for ( int i = 0 ; i < a . size ( ) ; i ++ ) { if ( ! a . get ( i ) . equals ( b . get ( i ) ) ) { return false ; } } return true ; }
arrayEquals determines whether two string arrays are identical .