Boa noite a todos estou com erro na linda 15: RETURN_GENERATED_KEYS) Statement não estou conseguindo rodar o meu projeto. Estou seguindo as videos aulas passo a passo. Desde já grato. package br.com.caelum.jdbc;
import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import java.sql.ResultSet;
public class TesteInsercao {
public static void main(String[] args) throws SQLException{ Connection connection = Database.getConnection();
Statement statement = connection.createStatement(); boolean resultado = statement.execute("inset into Produto (nome, descricao) values('Notbook i7')" Statement.RETURN_GENERATED_KEYS); System.out.println(resultado);
ResultSet resultSet = statement.getGeneratedKeys(); while(resultSet.next()) { String id = resultSet.getString("id"); System.out.println(id +"gerado"); }
statement.close(); connection.close(); }
}
``` Exception in thread "main" java.lang.Error: Unresolved compilation problems: Syntax error on token "Statement", delete this token RETURN_GENERATED_KEYS cannot be resolved or is not a field
at br.com.caelum.jdbc.TesteInsercao.main(TesteInsercao.java:15)