Skip to content
Snippets Groups Projects
Commit d6baf837 authored by RahulSherikar's avatar RahulSherikar
Browse files

read file

parent 480a28b6
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="12" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class Main {
public static void main(String args[]) throws IOException {
System.out.println("Hi");
File file = new File("SNLP2019_test.tsv");
BufferedReader br = new BufferedReader(new FileReader(file));
ArrayList<String> input = new ArrayList<>();
ArrayList<String> id = new ArrayList<>();
String s = "";
while ((s = br.readLine()) != null)
{
String inp[] = s.split("\\t+");
input.add(inp[1]);
id.add(inp[0]);
}
int i = 0;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment