| Home | JSP | EJB | JDBC | Java Servlets | WAP | Free JSP Hosting | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML | ||||
|
||||
|
|
||||
| Tutorial Categories: Ajax
| Articles
| JSP
| Bioinformatics
| Database
| Free
Books |
Hibernate
| J2EE
| J2ME
| Java
| JavaScript
| JDBC
| JMS
| Linux
| MS
Technology |
PHP
| RMI
| Web-Services
| Servlets
| Struts
| UML
|
|
||||||||||||||||||||||||||||||
|
Home | JSP | EJB | JDBC | Java Servlets | WAP | Free JSP Hosting | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs |
||||||||||||||||||||||||||||||
Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.
Copyright © 2007. All rights reserved.
Current Comments
2 comments so far (post your own) View All Comments Latest 10 Comments:please correct the error from this program.
public class Add
{
public static void main(String[]args)
{
int a[][]={{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1}};
int b[][]={{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2}};
calculate(a,b);
}
public static int calculate(int [][]a ,int [][]b);
{
int a[][]={{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1}};
int b[][]={{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2}};
int sum;
for(int x=0; x<=5; x++){
for(int y=0; y<=5; y++){
{
sum=a[x][y]+b[x][y];
}
}
}
System.out.println("The sum is:"+sum);
}
}
Posted by diana on Wednesday, 03.5.08 @ 09:50am | #51380
how to get the answer
adding two matrics
write 2 methods to add 2 matrics. the method header is as follows:
public static int[][] addMatrix(int [][]a, int[][]b).
the 2 matrix must have same dimension and the same or compatible types of elements.
Posted by diana on Monday, 02.25.08 @ 23:04pm | #49982