Home C C++ Java Python Perl PHP SQL JavaScript Linux Online Test

Home » Java » Java Interview Questions on Variables

Java Interview Questions on Variables - 16


Question: 1

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

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



Question: 2

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

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



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

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



Question: 4

(A) True
(B) False

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



Question: 5

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

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



Question: 6

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

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



Question: 7

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

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



Question: 8

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

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



Question: 9

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

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



Question: 10

(A) Garbage Value
(B) Code has compilation error
(C) null
(D) 0

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



Question: 11

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

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



Question: 12

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

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



Question: 13

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

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



Question: 14

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

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



Question: 15

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

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



Question: 16

Forum
Level: Beginner Category: 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