Example usage for javax.sql RowSet getFloat

List of usage examples for javax.sql RowSet getFloat

Introduction

In this page you can find the example usage for javax.sql RowSet getFloat.

Prototype

float getFloat(int columnIndex) throws SQLException;

Source Link

Document

Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.

Usage

From source file:com.oracle.tutorial.jdbc.JdbcRowSetSample.java

private void outputRowSet(RowSet rs) throws SQLException {
    rs.beforeFirst();//w w w  .ja  v a 2 s.co  m
    while (rs.next()) {
        String coffeeName = rs.getString(1);
        int supplierID = rs.getInt(2);
        float price = rs.getFloat(3);
        int sales = rs.getInt(4);
        int total = rs.getInt(5);
        System.out.println(coffeeName + ", " + supplierID + ", " + price + ", " + sales + ", " + total);

    }
}