plz help me i face this problem
my code is
`final Cursor curr = dbhelper.getdatatomanagedata();
startManagingCursor(curr);
Integer colid = curr.getInt(0);
String colans = curr.getString(1);
objansMap = new HashMap<Integer, String>();
if (curr!=null)
{
curr.moveToFirst();
while(!curr.isAfterLast())
{
objansMap.put(colid, colans);
curr.moveToNext();
}}
Your code must be as
When cursor returns its default index is -1, and you must move to its 0th index by using
moveToFirst().Another way to use your code as
Happy coding 🙂