I have created a Database class file to use SQLite db in Android app. Since I am beginner and I am having problem understanding what should i put in context when I instantiate Database class to another class The database code is as follows:
public Database(@nullable Context context) {
super(context,DATABASE_NAME,null,DATABASE_VERSION);
database=getWritableDatabase();
How can I instantiate it to an another class. When doing instantiation Database db = new Database(); what should be put under context
public Database(@nullable Context context) {
super(context,DATABASE_NAME,null,DATABASE_VERSION);
database=getWritableDatabase();
How can I instantiate it to an another class. When doing instantiation Database db = new Database(); what should be put under context