Java Interview Questions on Variables - 16
Question: 1
(A) 100
(B) 110
(C) 121
(D) 144
Level: Beginner Category of MCQ: variables
Question: 2
(A) 100
(B) 90
(C) 99
(D) 72
Level: Beginner Category of MCQ: variables
Question: 3
(A) Local variables are declared in methods, constructors, or blocks
(B) Local variables are created when the method, constructor or block is entered
(C) the variable will be destroyed once it exits the method, constructor, or block
(D) We can't create reference variables of Local variables
Level: Beginner Category of MCQ: variables
Question: 4
(A) True
(B) False
Level: Beginner Category of MCQ: variables
Question: 5
(A) 10"10"
(B) Compilation Error
(C) 20
(D) 1010
Level: Practitioner Category of MCQ: variables
Question: 6
(A) 10-10
(B) 0
(C) 1010
(D) Compilation Error
Level: Practitioner Category of MCQ: variables
Question: 7
(A) 10+10
(B) 1010
(C) Compilation Error
(D) Undefined
Level: Practitioner Category of MCQ: variables
Question: 8
(A) 0
(B) 10"-10"
(C) 10-10
(D) Compilation Error
Level: Expert Category of MCQ: variables
Question: 9
(A) 30
(B) 1020
(C) 10+10+10
(D) 1010+10
Level: Expert Category of MCQ: variables
Question: 10
(A) Garbage Value
(B) Code has compilation error
(C) null
(D) 0
Level: Beginner Category of MCQ: variables
Question: 11
(A) Garbage Value
(B) 0
(C) Undefind
(D) Compilation Error
Level: Beginner Category of MCQ: variables
Question: 12
(A) 5
(B) 10
(C) Error: Can't assign a value to final variable a
(D) None of the above
Level: Beginner Category of MCQ: variables
Question: 13
(A) 0
(B) 10
(C) Undefind
(D) Error: Can't modify final variable a
Level: Beginner Category of MCQ: variables
Question: 14
(A) 5
(B) 10
(C) 0
(D) Error: variable a might already have been assigned
Level: Beginner Category of MCQ: variables
Question: 15
(A) 10
(B) Compilation Error
(C) Undefind
(D) 0
Level: Practitioner Category of MCQ: variables
Question: 16
Level: Beginner Category of MCQ: variables