class probabilityMatrix
{
double[][] getMatrix()
{
double[][] arr = new double[][];
// array manipulation
return arr;
}
}
class page
{
void meth1()
{
probabilityMatrix a1 = new probabilityMatrix();
double d[][]=a1.getMatrix();
//print d[][];
}
}
This is what i have done in one of my programs. but it is showing the following error. i need help.
C:\Documents and Settings\Aruljose\Desktop>
java page
Exception in
thread "main" java.lang.NullPointerException
at probabilityMatrix.getMatrix(page.java:62)
at page.main(page.java:269)