What is a Java String's default initial value?

前端 未结 5 1872
暖寄归人
暖寄归人 2020-12-01 03:37

Consider a Java String Field named x. What will be the initial value of x when an object is created for the class x;

I know that for

5条回答
  •  情深已故
    2020-12-01 04:07

    The answer is - it depends.

    Is the variable an instance variable / class variable ? See this for more details.

    The list of default values can be found here.

提交回复
热议问题