hi all, it's first time for me I use java I need to use a stack in android funcions but if I define the stack out of the function give me the error (should be parametrized) and the application crashes
public class Televideo extends Activity{
Stack pila = new Stack();
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
pila.push(mystring);
}
@Override
public boolean onOptionsItemSelected(MenuItem item){
mystring = pila.peek();
}
}
how can I use the stack through class functions in java? thanks