import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter;
public class coordinates {
public static void main(String[] args) {
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
public class coordinates {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new FileReader(new File("C:\\Users\\TelmoG\\Desktop\\06092017.txt")));
PrintWriter out = new PrintWriter("C:\\Users\\TelmoG\\Desktop\\outputFile.csv");
String newLine ="";
int index = 0;
String line = "";
while((line = in.readLine()) != null){
// System.out.println(line);
index++;
if (index %2 == 0){
newLine += ";" + line.substring(34);
out.println(newLine);
} else {
newLine = line.substring(34);
};
}
in.close();
out.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Erro:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at coordinates.coordinates.main(coordinates.java:25)}
Linha 25Erro:
public static void main(String[] args) {
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at coordinates.coordinates.main(coordinates.java:25)
Linha 25:
public static void main(String[] args) {