I want to create an array for each object i create, but i cant get access to it. since its scope is within the constructor.
class Constructor{
Constructor(int vsl)
{
int[] array = new int[vsl];
}
}
If i call this constructor by Constructor c = new Constructor(4);
how can i use array in my code?
Note: i want to specifically create the object inside the constructor and manipulate it using values i get from scanner object.