getColumnCount()

Syntax:

int getColumnCount()
                   throws SQLException

Description:

Returns the number of columns in this ResultSet object.

Returns:

the number of columns

Throws:

SQLException - if a database access error occurs or the object has been closed.

Reference:

For more information, reference JDBC documentation for: ResultSetMetaData.getColumnCount()