rendered paste bodyimport java.io.*;
import java.lang.*;
public class configGetter {
private static String firstLine = null;
private static int indexNum1;
private static String firstType;
public static String retType() {
FileReader reader = null;
try {
reader = new FileReader("gameConfiguration.txt");
}
catch (FileNotFoundException e) {
System.err.println("File does not exist , using defaultGameConfiguration");
}
BufferedReader buffReader = new BufferedReader(reader);
String input = null;
try {
input = buffReader.readLine();
}
catch (IOException e) {
System.err.println("IO ERROR");
System.exit(1);
}
firstLine=input;
indexNum1=indexOf("@");
firstType=substring(0,indexNum1);
return firstType;
}
public static void main(String[] args) {
System.out.println( retType());
}
}