The android.database Cursor getInt method returns the value of the specified column in the current row of the cursor as an integer. It takes the index of the column as a parameter.
Examples: 1. To retrieve the integer value in a "quantity" column in a cursor at position 0:
int quantity = cursor.getInt(3);
2. To retrieve the integer value in a "score" column in a cursor at position 1:
int score = cursor.getInt(2);
Package library: android.database
Note: The column index in getInt() starts at 0, so the index of the first column is 0, the second column is 1, and so on. The method can be used to retrieve integer values from a cursor that is returned from a query execution.
Java Cursor.getInt - 30 examples found. These are the top rated real world Java examples of android.database.Cursor.getInt extracted from open source projects. You can rate examples to help us improve the quality of examples.