Actually its name makes the new android developers confuse. A cursor is just a simple cursor as we have for the mouse in operating system. But the working behavior of the mouse cursor and the
Cursor you are asking about is different.
In case of mouse cursor, when we take this cursor above any object on our screen it means we are accessing this object. For example i move my mouse cursor over Recycle Bin icon, or My Documents icon, it means i am accessing the Bin icon, or My Documents on the screen.
Now lets come to the actual topic. A cursor in android is a type of Data Structure that works from top to bottom. Cursor in android are mostly returned from SQLite database (or can be returned from any other database other than SQLite) in which you can fetch the data from each single row from top to bottom. When the cursor is on the first row you will have the data of first row, once done, the cursor will move to second row, you will have the data of second row, when the cursor will be on the third row, you will and the data of third row and so on. Once you reach the last row, the cursor will say there are no next rows, so you can stop your looping of data retrieval at that point.
So, Cursors are what contain the result set of a query made against a database in Android. Unlike mouse cursor, these works from top to bottom in the retrieved data, vertically.
Now why we use cursors in android?
Cursors are used for efficient data retrieval from the database, which can help to retrieve data within the loop very efficiently. When we have any result set from the database, it is thrown to Cursor data structure and that Cursor object is returned using which we can display the retrieved data, we can stop the loop once we retrieve the last row of the result set.
These are some method you should consider while understanding Cursor:
moveToFirst()
moveToLast()
moveToNext()
moveToPrevious()
moveToPosition(position)
For more
visit this link and
this link.
Note: The example of mouse cursor is used for the sake of understanding.
Your answer is here https://developer.android.com/reference/android/database/CursorYellow Daddy Aug 6 '19 at 5:51:37