Android tutorial errors
<p>I've borrowed the following code from Wei-Meng Lee's "Beginning Android Application Development":</p>

<pre><code>import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DBAdapter {

    private static final String TAG = "DBAdapter";
    private static final String DATABASE_NAME = "MyDB";
    private static final int DATABASE_VERSION = 1;
    private static final String DATABASE_CREATE =
            "create table contacts (_id integer primary key autoincrement, "
                    + "name text not null, email text not null);";
    private final Context context;
    private DatabaseHelper DBHelper;
    private SQLiteDatabase db;
    public DBAdapter (Context ctx)
    {
        this.context = ctx;
        DBHelper = new DatabaseHelper(context);
    }

    private static class DatabaseHelper extends SQLiteOpenHelper
    {
        DatabaseHelper(Context context)
        {
            super(context, DATABASE_NAME, null, DATABASE_VERSION);
        }

        @Override
        public void onCreate(SQLiteDatabase db)
        {
            try {
                db.execSQL(DATABASE_CREATE);
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }

        @Override
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
        {
            Log.w(TAG, "Upgrading database from version " + oldVersion + " to "
                    + newVersion + ", which will destroy all old data");
            db.execSQL("DROP TABLE IF EXISTS contacts");
            onCreate(db);
        }
    }
}
</code></pre>

<p>There's more but I'm trying to simplify.</p>

<p>I get the following errors:</p>

<blockquote>
  <p>Description    Resource    Path    Location    Type</p>
  
  <p>Syntax error on token ")", { expected after this token DBAdapter.java</p>
</blockquote>

<p>at the end of <code>onUpgrade</code></p>

<blockquote>
  <p>Syntax error, insert "}" to complete ClassBody DBAdapter.java</p>
  
  <p>Syntax error, insert "}" to complete ClassBody DBAdapter.java</p>
</blockquote>

<p>at the end of <code>onCreate</code></p>

<p>I'm new to Android apps so could somebody please help me understand these messages?</p>

<p>Here's what Eclipse is displaying:</p>

<p><img src="http://i.stack.imgur.com/TnAo4.png" alt="enter image description here"></p>
