Java - Static Keyword
Which of the following code snippets correctly declares a static block in Java?
static followed by a pair of braces {} without any method name or return type.static { ... }. Options B, C, and D incorrectly add parentheses or return types which are invalid for static blocks.static { ... } [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions