Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

menu in loop

 
vin Hari
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
Can anyone tell me can we write
//means array of submenus are allowed

Because iam using a loop in that i want to get in this way if not possible is there any alternative for this please help me.
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vin Hari:



Are you getting any errors while using it? Or have you not tried it out yourself?
 
vin Hari
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Thank you for reply i tried already i was not getting means it was showing some exception,but while declaring
for ex: No error or exception.
but while assigning in a loop
here it throws an exception ArrayIndexoutofbound Exception,please if anyone have used it please reply me.
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vin Hari:
here it throws an exception ArrayIndexoutofbound Exception,please if anyone have used it please reply me.


Without seeing your code, I cannot figure out why you are getting the exception.

Here is a code snippet which works properly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic