This is a simple Java array program . In this session we will teach how to use of a two dimensional array. First of all we will define a class "Matrix". In this program we are going to make two dimensional array having three row and three columns.
By using the multidimensional array we are going to make a matrix. For that we have to use a nested for loop. The for loop takes three parameters one is the initialization value, second, the place up to where the loop runs and the third one is the counter. Now declare one boolean type of variable found which will indicate whether the array has reached its limit or not. Please go through this program properly so that you can understand what is happening in this program.
Here is the code of this Program
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: April 17, 2011 If you enjoyed this post then why not add us on Google+? Add us to your Circles