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 COURSE_NAME = "COURNAME";
    public static final String STUDENT_NUMBER = "NUMBER";
    public static final String STU_COUR_TABLE = "STUDENTCOURSE";

    public static void insertStudentCourse(final SQLiteDatabase database, final String id,
            final String courseName) {
        final ContentValues courseValues;

        courseValues = new ContentValues();
        courseValues.put(STUDENT_NUMBER, id);
        courseValues.put(COURSE_NAME, courseName);
        database.insert(STU_COUR_TABLE, null, courseValues);
    }
}