Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Sidney Castro
Added: Oct 12, 2018 2:33 PM
Views: 7
Tags: no tags
  1.  public double mediaAluno(int al, int ds){
  2.         String sql = "select funcao.Media(" + al + "," + ds + ");";
  3.      
  4.         try {
  5.             rs=stm.executeQuery(sql);
  6.             rs.next();
  7.            
  8.             return rs.getDouble(1);
  9.         } catch (SQLException ex) {
  10.             Logger.getLogger(DisciplinaSQL.class.getName()).log(Level.SEVERE, null, ex);
  11.         }
  12.        
  13.         return 0;
  14.     }