Considere a seguinte tabela NOTAS e seu conteúdo.Statement s...

Próximas questões
Com base no mesmo assunto
Q874224 Programação

Considere a seguinte tabela NOTAS e seu conteúdo.


Imagem associada para resolução da questão


Statement stmt = null;

String query = "select n.codMatricula, n.nota" +

"from NOTAS n";

try{

stmt = con.create Statement();

ResuItSet rs = stmt.executeQuery(query);

float nota = (float)0.0;

while (rs.next()) {

nota += rs.getFloat("nota");

}

System.out.println(nota);

} catch (SQLExceptione) {

e.printStackTrace();

} finally {

if (stmt != null) {stmt.close();}

}


Utilizando JDBC, o que o trecho de código Java imprime no console?

Alternativas