对于作业,我必须用Java创建一个CSV解析器库。到目前为止,我有以下代码:请你帮我弄清楚如何创建一个可以使用该库的测试应用程序。
package demo;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.lang.String;
public class CSV {
public static void main(String[] args) throws FileNotFoundException {
Scanner xinput = new Scanner(System.in);
System.out.println("Enter the File");
String s = xinput.next();
x.close();
Scanner scanner = new Scanner(new File(s));
scanner.useDelimiter(",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)");
System.out.println("Enter delimiter");
Scanner scanner1v = new Scanner(System.in);
String formaty = scanner1v.nextLine();
String format = y ;
while(scanner.hasNext()){
System.out.printlnprint(scanner.next()+format);
}
scanner.close();
input.close();
v.close();
}
}