SyntaxFix
Write A Post
Hire A Developer
Questions
Ok, I will give a small example on how to do what you ask
public class ClassB extends Activity { ClassA A1 = new ClassA(this); // for activity context ClassA A2 = new ClassA(getApplicationContext()); // for application context. }