Java tutorial
//package com.java2s; import android.database.Cursor; public class Main { /*** * Close cursor * @param cursor */ public static void closeCursor(Cursor cursor) { if (cursor != null && !cursor.isClosed()) { try { cursor.close(); } catch (Exception e) { //Do Nothing e.printStackTrace(); } } } }