Thanks I made it only forget to delete from here. On aug. 6, 20:23, Kostya Vasilyev <kmans...@gmail.com> wrote: > Oh, and here is another one: > > nextInt(3) can be one of: 0, 1, 2. > > nextInt(3) +1 then becomes one of: 1, 2, 3. > > This: > > imageArr[rndInt] > > expects values 0, 1, 2 > > So, take out the "+1", to avoid getting an index-out-of-bounds exception. > > -- Kostya > > 07.08.2011 0:01, Zwiebel пишет: > > > Random rand = new Random(); > > int rndInt = rand.nextInt(3) + 1; > > -- > Kostya Vasilyev
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en