I am very new to Java and I am trying to compile "+" in the file Reactions.csv. Here's what I have so far:
// Trial.java
import java.io.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.*;
public class Trial{
public static void main(String[] arg) throws Exception {
BufferedReader b1 =
new BufferedReader(new FileReader("Reactions.csv"));
String strRead;
while ((strRead=b1.readLine())!=null){
String splitarray[] = strRead.split("\t");
String firstentry = splitarray[0];
String secondentry = splitarray[7];
}
String input = b1.readLine;
Pattern p = Pattern.compile("[+]");
Matcher m = p.matcher(input);
List<String> genes = new ArrayList<String>();
while (m.find()) {
System.out.println("Found a " + m.group() + ".");
genes.add(m.group());
}
} //main()
} // Trial
I am getting an error that says "cannot find symbol" b1.readline. I want this line to read line by line from Reactions.csv but clearly it's not working.
Any ideas?