Find the value

Report a typo

You have a class with static members:

public class AClass {

    private static String str = "a string";

    static {
        str = "another string";
    }

    public AClass() {
        str = "yet another string";
    }

    public static String getStr() {
        return str;
    }
} 

What is the value of the static field str during runtime before and after creating an instance of this class?

Select one option from the list
___

Create a free account to access the full topic