Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
IList.getColumnName
Returns the name of the column at a specified offset.
Syntax
public String getColumnName(int i) throws ArrayIndexOutOfBoundsExceptionParameters
i
- Index number of a column in the list.
Description
The
getColumnName
method returns the name of the specified column. Columns begin numbering from zero.Returns
Returns a string containing the column name.
Throws
ArrayIndexOutOfBoundsException
- If you specify a value of
i
that falls outside the range0
ton-1
, wheren
is the number of columns.
Example
The following code fragment accesses all the column names in the
MatchingMovies
list:
int NumberOfColumns = MatchingMovies.numColumns(); int c; String ColumnName; for (c = 0; c < NumberOfColumns; c++) { ColumnName = MatchingMovies.getColumnName(c); // Do something with ColumnName ... }
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.