public class build_array
{
private int array_size;
// private int val1, val2, val3, val4, val5;
private int[] vals;
private my_class[] arr;
// private float val1per, val2per, val3per, val4per,...
Type: Posts; User: javapenguin
public class build_array
{
private int array_size;
// private int val1, val2, val3, val4, val5;
private int[] vals;
private my_class[] arr;
// private float val1per, val2per, val3per, val4per,...
arr = new my_class[array_size];
You never defined array_size. You declared it but never gave it a value.
That also will make an error.
If you're allowed to, why not pass the array size to...
public class build_array(){
this will make an error.
You're both trying to define the beginning of a class and making that beginning into a constructor at the same time.
Lose the () after...
If all your values in the array are single characters, make a char array.