CppBuzz.com
  
Home C C++ Java Python Perl PHP SQL JavaScript Linux Online Test Forum

Home » Java » Java Interview Questions on Variables

Java Interview Questions on Variables - 16 Questions


Question: 1

(A) 100
(B) 100
(C) 121
(D) 144

Forum
Beginner variables[Posted by: Admin | Chicago, USA]



Question: 2

(A) 100
(B) 100
(C) 99
(D) 72

Forum
Beginner variables[Posted by: Admin | Chicago, USA]



Question: 3

(A) Local variables are declared in methods, constructors, or blocks
(B) Local variables are declared in methods, constructors, or blocks
(C) the variable will be destroyed once it exits the method, constructor, or block
(D) We can't create reference variables of Local variables

Forum
Beginner variables[Posted by: Admin | Chicago, USA]



Question: 4

(A) True
(B) True

Forum
Beginner variables[Posted by: Admin | Chicago, USA]



Question: 5

(A) 10"10"
(B) 10"10"
(C) 20
(D) 1010

Forum
Practitioner variables[Posted by: Admin | Chicago, USA]



Question: 6

(A) 10-10
(B) 10-10
(C) 1010
(D) Compilation Error

Forum
Practitioner variables[Posted by: Admin | Chicago, USA]



Question: 7

(A) 10+10
(B) 10+10
(C) Compilation Error
(D) Undefined

Forum
Practitioner variables[Posted by: Admin | Chicago, USA]



Question: 8

(A) 0
(B) 0
(C) 10-10
(D) Compilation Error

Forum
Expert variables[Posted by: Admin | Chicago, USA]



Question: 9

(A) 30
(B) 30
(C) 10+10+10
(D) 1010+10

Forum
Expert variables[Posted by: Admin | Chicago, USA]



Question: 10

(A) Garbage Value
(B) Garbage Value
(C) null
(D) 0

Forum
Beginner variables[Posted by: Admin | Chicago, USA]



Question: 11

(A) Garbage Value
(B) Garbage Value
(C) Undefind
(D) Compilation Error

Forum
Beginner variables[Posted by: Admin | Chicago, USA]



Question: 12

(A) 5
(B) 5
(C) Error: Can't assign a value to final variable a
(D) None of the above

Forum
Beginner variables[Posted by: Admin | Chicago, USA]



Question: 13

(A) 0
(B) 0
(C) Undefind
(D) Error: Can't modify final variable a

Forum
Beginner variables[Posted by: Admin | Chicago, USA]



Question: 14

(A) 5
(B) 5
(C) 0
(D) Error: variable a might already have been assigned

Forum
Beginner variables[Posted by: Admin | Chicago, USA]



Question: 15

(A) 10
(B) 10
(C) Undefind
(D) 0

Forum
Practionar variables[Posted by: Admin | Chicago, USA]



Question: 16

Forum
Beginner variables[Posted by: Admin | Chicago, USA]


[Contribute to this Website]


Browse Java Categories

Datatype Variables Operators Decision Making Loops Methods Reference Variables Arrays Classes and Objects Abstract Class Singleton Class Modifiers Inheritance Overriding Polymorphism Abstraction Encapsulation Files and I/O TypeCasting Packages Exceptions Collections Framework Numbers Class Date & Time Regular Expressions Data Structures Interfaces Multithreading Other