1

getting id of button and performing operations in android

view story
linux-howto

http://stackoverflow.com – in my android application there is group of buttons.i have given them id as b1,b2,b3... and using random function i'm generating a number and by using that number i'm changing button image. ex. if random number is 6.then i want to change image of button whose id is b6. how can i create id b6 using integer 6 and b and perform operations on that button. String id; Random rand=new Random(); int num=rand.nextInt(9)+1; id="b"+num; but in android id of button is not in string format (HowTos)