Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.database.sqlite.SQLiteDatabase;

public class Main {
    public static void deleteAll(SQLiteDatabase db, String name) {
        db.delete(name, null, null);
    }

    public static int delete(SQLiteDatabase db, String name, int id) {
        String[] whereArgs = { String.valueOf(id) };
        return db.delete(name, "id = ?", whereArgs);
    }
}