File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Multidimensional Arrays problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Multidimensional Arrays problem" Watch "Multidimensional Arrays problem" New topic

Multidimensional Arrays problem

Tom Robert

Joined: Sep 15, 2010
Posts: 6
I need to write a method to add 2 matrices and Im having a little trouble getting this to run. I keep getting illegal start of expression error on lines 29 and 39. Can someone point me in the right direction please?

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Maybe because you forgot to close the main method before line 29. I didn't try to compile it, but I don't see any closing brackets there.

[My Blog]
All roads lead to JavaRanch
Kurt Van Etten
Ranch Hand

Joined: Sep 07, 2010
Posts: 98
For what it's worth, it also looks like you are garbling the difference between adding two matrices and multiplying them, although that is a logic error and has nothing to do with your error messages.

I agree. Here's the link:
subject: Multidimensional Arrays problem
It's not a secret anymore!