Answer the question
In order to leave comments, you need to log in
What context to specify when working with sqlite in a separate class?
I'm new to Java programming so don't judge too harshly. I decided to create a sqlite database, made a separate DB class, described the database in it. The constructor has a standard form:
public DB(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
public class data {
DB db;
public void initialize(){
db = new DB(???);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question