Este es mi código:
public List<?> listar() throws SQLException { Connection conn = DriverManager.getConnection( "jdbc:mysql://localhost/control_de_stock?useTimeZone=true&serverTimeZone=UTC", "root", "**");
*ESTE ES El STATEMENT QUE ME DA ERROR * Statement statement = conn.createStatement();
boolean result = statement.execute("SELECT id, nombre,descripcion, cantidad FROM PRODUCTO");
System.out.println(result);
conn.close();
return new ArrayList<>();
}
Exception in thread "main" java.lang.Error: Unresolved compilation problem: Statement cannot be resolved to a type