When creating the execute method it generates error at this point rs = stm.executeQuery (sql) what can i do
public void excutaSQL(String sql){
try {
stm=(Statement) conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs = stm.executeQuery(sql);// o erro está neste linha
} catch (SQLException ex) {
Logger.getLogger(Conection.class.getName()).log(Level.SEVERE, null, ex);
}
}
error: can not find symbol
rs = stm.executeQuery (sql);
symbol: method executeQuery (String)
location: variable stm of type Statement
1 error
import java.beans.Statement;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;