Skip to content
Snippets Groups Projects

Dominicsbranch

Merged Dominic Daniel Krämer requested to merge dominicsbranch into main
3 files
+ 26
5
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 19
0
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
public class Application {
public static void main(String[] args) {
BufferedReader reader;
String datapath = "expressions.txt";
try {
System.out.println("Reading the file:");
reader = new BufferedReader(new FileReader(datapath));
String line = reader.readLine();
while(line != null) {
System.out.println(line);
line = reader.readLine();
}
System.out.println();
reader.close();
}
catch (IOException e ) {
e.printStackTrace();
}
//List with a fitting String to be parsed into multiple tokens
List<String> test = Arrays.asList("1 + xy^2 - (31 * x)y");
//Iterates through every String
Loading