+ 1
when you need more than one object of a class, you can't do it with everything static imagine you have a class circle and want an array of 100 circles, each with different coordinates class Circle{ int x, y, r; } circles=new Circle[100]; for(int i=0;i<100;i++) circles[i]=new Circle(rnd.nextInt(),rnd.nextInt(),rnd.nextInt()); if x, y, r were static, all circles would have the coordinates of the last one
31st Jan 2018, 6:05 PM
michal