Java Professional — Hard
Key points
- Static blocks are executed before the main method in Java.
- The value of x is updated in each static block.
- The final value of x is 25 after both static blocks are executed.
Ready to go further?
Related questions
Java Professional — Hard
Key points
Ready to go further?
Related questions