public class .. {
TextView txt;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
txt = (TextView)findViewById(R.id.booom);
doMethod();
}
ClassOne classOne = new ClassOne();
private void doMethod() {
classOne.refire(this, classTwo);
}
public ClassTwo classTwo = new ClassTwo (){
public void nomnom(Double ing){
txt.setText(String.valueOf(ing); //null point error
}
}
txt.setText(String.valueOf(ing); return null pointer error expection once the program is run, if i used toast in there without using txt.setText, its working fine.
What would be the problem?
Thanks
txt.setText(String.valueOf(ing));