devxlogo

March 21, 1997

Code Generates Null Pointer Exception

Question: If I have: class point { double x,y; } & import point; class test { public static void main(String args[]) { point[] P = new point[10]; P[0].x = 5;