Java String Split by Line split(String line, String delimiter)

Here you can find the source of split(String line, String delimiter)

Description

split

License

Apache License

Declaration

public static List<String> split(String line, String delimiter) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Arrays;
import java.util.List;

public class Main {
    private static final String DEFAULT_DELIMITER = ",";

    public static List<String> split(String line, String delimiter) {
        String[] elements = line.split(delimiter);
        return Arrays.asList(elements);
    }/*from   w  w  w  .j a  v  a  2  s . c  o m*/

    public static List<String> split(String line) {
        return split(line, DEFAULT_DELIMITER);
    }
}

Related

  1. split(String line)
  2. split(String line)
  3. split(String line)
  4. split(String line, char delimiter)
  5. split(String line, char delimiter)
  6. split(String line, String regex)
  7. split(String line, String separator)
  8. split(String line, String separator)
  9. split(String line, String separator)