Please solve NZEC error in java

Actually I tried to submit one program in java & try almost 30 different possibilities…
But still I got nzec error.So please solve that error.
I here write one simple Program,so submit on any question and try to get wrong answer instead of nzec error…

import java.util.Scanner;
class RotateMatrix
int mat[][];
int n,m;
public static void main(String[] args)
Scanner user_input = new Scanner(;
RotateMatrix r = new RotateMatrix();

	r.n = user_input.nextInt();
	r.m = user_input.nextInt();
void readdata()
	Scanner input = new Scanner(;
	mat = new int[n][];
	int j;
	for(int i=0;i<n;i++)
		mat[i] = new int[n];
			mat[i][j] = input.nextInt();


I feel your program must be throwing some exception while taking input , hence NZEC error. Are you sure you are taking the input correctly? If you could provide the problem link then people could help better.
Note:Use BufferedReader over Scanner while taking input.