What is the notation for matrix in java?

Showing Answers 1 - 1 of 1 Answers

Navdeep

  • Nov 21st, 2005
 

Array is the collection of Similar data type and has fix size.

datatype arrayname[]=new datatype[size];   or

datatype []arrayname=new datatype[size]; 

eq: int a[]=new int[10];

Two Dim Array: 

datatype arrayname[][]=new datatype[rows][cols];   or

datatype [][]arrayname=new datatype[rows][cols];   or

eq: int a[][]=new int[2][2];

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions