I want to map the buttons to an array of buttons and the code has no errors while compiling but there is force close when i run it:
Button buttons[]; @Overr
I had situation like this, I chose different approach. I stored id into integer array.
Int[] btnarr = new int[3]; btn[0]=R.id.button1; // give your ID Button btn = (Button).findViewById(cc[i]);