Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.ContentValues;

import android.database.sqlite.SQLiteDatabase;

public class Main {
    public static final String STUDENT_TABLE = "STUDENT";
    public static final String STUDENT_NUMBER = "NUMBER";
    public static final String STUDENT_NAME = "STUNAME";

    public static void insertStudent(final SQLiteDatabase database, final String id, final String name) {
        final ContentValues courseValues;

        courseValues = new ContentValues();
        courseValues.put(STUDENT_NUMBER, id);
        courseValues.put(STUDENT_NAME, name);
        database.insert(STUDENT_TABLE, null, courseValues);
    }
}