Commit 56962a8c authored by trh010's avatar trh010
Browse files

moved test files around

parent 3c93c62b
...@@ -5,30 +5,31 @@ import java.io.FileNotFoundException; ...@@ -5,30 +5,31 @@ import java.io.FileNotFoundException;
import java.util.Scanner; import java.util.Scanner;
public class Main { public class Main {
AdjacencyList adjList; AdjacencyList adjList;
public Main(){ public Main() {
adjList = new AdjacencyList(); adjList = new AdjacencyList();
} }
public void createGraph(String path){ public void createGraph(String path) {
File file = new File(path); File file = new File(path);
try { try {
Scanner in = new Scanner(file); Scanner in = new Scanner(file);
System.out.println(in.next()); System.out.println(in.next());
in.close(); in.close();
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
System.err.println("Error in opening the file: " + path + ". Please check the file path."); System.err.println("Error in opening the file: " + path
} + ". Please check the file path.");
} }
}
public static void main(String[] args){ public static void main(String[] args) {
try {
Main main = new Main(); Main main = new Main();
main.createGraph(args[0]); main.createGraph(args[0]);
} catch (Exception e) {
} System.err.println("Error! - " + e.toString());
}
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment