This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do return double integer array from a method?

 
Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Its been since I touched java. I am facing this peculiar run-time error arrayindex out of bounds exception?
Please help...
my code
main()
{
int employeematrix[][]= new int[8][7];
int result[][]= compute(employeematrix);
}
int[][] compute(int emp[][])
{

.....................
...
...
return emp1;
}
Thanx
 
Rich Raposa
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The part causing the runtime exception is likely in the "............" section of your post.
 
Jasper Vader
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i think it is in the
"...
..."
section after the "........." section!
haha sorry just joking. but i think Rich is right ... the compute method is doing something that is returning a value outside of the limits you specified.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic