Monday, April 15, 2013

Selenium : Size of Matrix or 2D array

 Calculate Size of Matrix or Size of 2D Array


public class Size_Matrix {
 public static void main(String[] args)
 {
  int[][] matrix = new int[20][30];
  System.out.println("Number of rows = " + matrix.length);
  System.out.println("Number of columns = " + matrix[0].length);
 }

No comments:

Post a Comment