+ 1
What will be the output of the following code snippet
public class test34 { static String value = "testify"; static int value1=25; static { value1=50; System.out.println(value); System.out.println(value1); } public static void main(String args[]) { } { System.out.println(value); }} Thanks everyone
1 ответ
+ 1
You can always test it in a compiler. 😜
testify
50
The IIB doesn't run since no object was created.
And Main does nothing.