public static List<String> toList(String[] array){
  List<String> list=new ArrayList<String>();
  if ((array != null) && (array.length > 0)) {
    for (int i=0; i < array.length; i++) {
      list.add(array[i]);
    }
  }
  return list;
}

public static List < String > toList ( String [ ] array ) { List < String > list = new ArrayList < String > ( ) ; if ( ( array != null ) && ( array . length > 0 ) ) { for ( int i = 0 ; i < array . length ; i ++ ) { list . add ( array [ i ] ) ; } } return list ; }
returns a list of string by adding string in an array to it .
