Select the correct answerThe default value of a static integer variable of a class in Java is,Options10-1Garbage valueNull
Question
Select the correct answerThe default value of a static integer variable of a class in Java is,Options10-1Garbage valueNull
Solution
The default value of a static integer variable of a class in Java is 0.
Similar Questions
Select the correct answerWhat is the default initial value of elements in an array of integers in Java?OptionsNull10Undefined
Select the correct answerA variable in Java that's declared within the body of a method. and can used only within that method is called Optionsstatic variablelocal variableinstance variableNone of the mentioned
Select the correct answerWhat is the scope of a local variable in Java?Optionsclassglobalmethodpackage
Select the correct answerAll methods and variables in Java language are kept inside a__________OptionsClass or InterfaceFilestatic methodmain
elect the correct answerPredict the output ?class Test { public static void main(String args[]) { int arr[] = new int[2]; System.out.println(arr[0]); System.out.println(arr[1]); }}OptionsCompiler Errorgarbage valuegarbage value00Exception
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.