I am a learner on android. But now i've got stuck in a piece of code. can you please help me out.
I have created a class name CreateCourse. In this class I called a method dbHandler.getdata(); which is on DbHandler.java file.

this is getdata method

public List getdata() throws NullPointerException {
List list = new ArrayList();

SQLiteDatabase db = getWritableDatabase();
String query = "SELECT * FROM " + TABLE_COURSE +";";
Cursor c = db.rawQuery(query,null);

System.out.println("NO DATA");
return null;
else {
do {
list.add(new Course(c.getString(0), c.getString(1), c.getString(2)));
}while (c.moveToNext());
return list;

now the problem is this, how can i get this list on same CreateCourse.java file in a ListView.