For example:
while (some_condition) {
byte[] myArray = new byte[65536];
...do some array manipulate...
...
}
and
byte[] myArray = new byte[65536];
while (some_condition) {
...clear / system.arraycopy the myArray with 0
...then, do some array manipulate...
...
}
Which is more memory efficient OR speed benefit in Java JVM?
And when loop is deeper, extract inner-most local array to outer-most is ugly and hard to understand.