If I have
class example {
int x;
int data[] = new int[x]
}
If I wanted to create a new method that creates a new array whose size is one greater than data's length how would I proceed? I don't understand how I can create a new array when I don't know the initial length and adding one to that?
0or1+data.length