Looking at the source code for android.database.Cursor, I notice that all its member functions are undefined.
If so, how can we directly use Cursor? Shouldn’t we have to use some concrete class that implements Cursor?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You do “use some concrete class that implements
Cursor“. For example, when you query SQLite, you get aSQLiteCursorback. We just tend to reference it as the interface type (Cursor), in case we change the implementation sometime (e.g., switch to querying aContentProvider).If you look at the JavaDocs for
Cursor, you will see a list of classes that implement this interface.