package mobile;
import java.util.*;
/**
*
* @author user
*/
public class Mobile {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int[][] data = new int[10][10];
data = timesTable(10,10);
Scanner scan = new Scanner(System.in);
System.out.print("Enter Row:");
int row2 = scan.nextInt();
System.out.println("");
System.out.print("Enter Column:");
int column2 = scan.nextInt();
for (int row = 0; row < data.length ; row++)
{
for (int column = 0; column < data[row].length; column++)
{
System.out.printf("%2d ",data[row][column]);
}
System.out.println();
}
}
public static int[][] timesTable(int r, int c)
{
int [][] yes = new int[r][c];
for (int row = 0; row < yes.length ; row++)
{
for (int column = 0; column < yes[row].length; column++)
{
yes[row][column] = (row+1)*(column+1);
}
}
return yes;
}
}
can some one tell me how i can call the data's of row2 and column2 and insert them onto "int [][] yes = new int[r][c];" replacing the value of r and c respectively.
`