You are using static final constant variable. This variable will be replaced at the compile time by the actual constant value, in-order to increase the performance. If you have a look at the compiled binary code (Yes you cannot ;) but technically speaking with an assumption) it will be something similar to this:
public class Test {
public static void main(String[] args) {
System.out.println(10); // Constant
}
}
class Hello {
static final int a1=10;
static {
System.out.println("SB");
}
}
Based on this code, class Hello will not be loaded into the RAM. So it will not print the SB.