What's wrong with the below program?
package test;
public class Test {
byte[] array = new byte[2];
array[0] = 'A';
array[1] = 'B';
}
Look,the IDE indicate some problems(click to enlarge) :
In the other word, why should I move the filler lines to another inner scope as follow :
package test;
public class Test {
byte[] array = new byte[2];
{
array[0] = 'A';
array[1] = 'B';
}
}
The IDE doesn't have any problem with above program.