Gjbob
15-02-2009, 10:31
package core;
import java.io.*;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class rOperation{
public final String dispPath = null;// "C://bRub/disp/bmagdb.db";
private String dbPath = null;
public void setdbPath(String newPath){
dbPath = newPath;}
File f = new File(dispPath);
try {
f.createNewFile();
}
catch (IOException ex) {
ex.printStackTrace();
}
}
Linea 11: Illegal start of type
Linea 14: Illegal start of type
Linea 15: ";" expected
Con questo codice ottengo questi errori eppure il cod. mi pare giusto; come mai?Sto utilizzando netbeans 6.5
import java.io.*;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class rOperation{
public final String dispPath = null;// "C://bRub/disp/bmagdb.db";
private String dbPath = null;
public void setdbPath(String newPath){
dbPath = newPath;}
File f = new File(dispPath);
try {
f.createNewFile();
}
catch (IOException ex) {
ex.printStackTrace();
}
}
Linea 11: Illegal start of type
Linea 14: Illegal start of type
Linea 15: ";" expected
Con questo codice ottengo questi errori eppure il cod. mi pare giusto; come mai?Sto utilizzando netbeans 6.5