Yes, one of the way is static block but in previous version of JDK not in JDK 1.7 In JDK7 and above, output will be:
Output:static block is invoked (if not JDK7)