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

moved test files around

parent 3c93c62b
......@@ -5,30 +5,31 @@ import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main {
AdjacencyList adjList;
public Main(){
adjList = new AdjacencyList();
}
public void createGraph(String path){
File file = new File(path);
try {
Scanner in = new Scanner(file);
System.out.println(in.next());
in.close();
} catch (FileNotFoundException e) {
System.err.println("Error in opening the file: " + path + ". Please check the file path.");
}
AdjacencyList adjList;
public Main() {
adjList = new AdjacencyList();
}
public void createGraph(String path) {
File file = new File(path);
try {
Scanner in = new Scanner(file);
System.out.println(in.next());
in.close();
} catch (FileNotFoundException e) {
System.err.println("Error in opening the file: " + path
+ ". Please check the file path.");
}
}
public static void main(String[] args){
Main main = new Main();
main.createGraph(args[0]);
}
public static void main(String[] args) {
try {
Main main = new Main();
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