/**
* @(#)TestClassOne.java
*
*
* @aziza meshal
* @version 1.00 2011/11/12
*/
import java.util.Scanner;
public class TestClassOne {
public static void main(String [] args)
{ int size;
Scanner input=new Scanner (System.in);
System.out.println("plz enter size of array");
size =input.nextInt();
int [] a1 = new int [size];
ClassOne [] a2 = new ClassOne [size];
for(int j=0;j<a1.length;j++)
{
System.out.println(a1[j]);
a2[j].print();
}
}
public static void fillArray(int a1[] , ClassOne a2[] ){
Scanner input=new Scanner (System.in);
for(int i=0;i<a1.length;i++)
{
a1[i]=input.nextInt();
a2[i]= new ClassOne( a1[i],a1[i]*2);}}
}
there is no error but when i run it appear this
Exception in thread "main" java.lang.NullPointerException
at TestClassOne.main(TestClassOne.java:23)
Process completed.