Can I do this in Java?
At Runtime:
int length = some arithmetic that loads length
then I use length to do this:
byte [] b = new byte[length];
Will this throw an Exception at Runtime? If so which one?
Can I do this in Java?
At Runtime:
int length = some arithmetic that loads length
then I use length to do this:
byte [] b = new byte[length];
Will this throw an Exception at Runtime? If so which one?
No that won't throw an exception at runtime, unless of course length is negative.