Few edits are there to run the program correctly------------
import java.util.Scanner;
class apple{
public static void main(String args[]){
int a[][] = new int[4][4];
int m,n;
Scanner mad = new Scanner(System.in);
System.out.println("Enter the order");
m = mad.nextInt();
n = mad.nextInt();
System.out.println("Order is " + m + "x" + n);
System.out.println("Enetr the elements");
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
a[i][j] = mad.nextInt();
}
}
System.out.println("The matrix is");
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
System.out.print(a[i][j]);
}
System.out.println();
}
}
}
the major mistake is in the loops!!