Get the FREE certificate on C, C++, Java, Python, Perl, PHP, SQL, Linux & Javascript!  

CppBuzz.com
  
Home C C++ Java Python Perl PHP Spring SQL Javascript Linux Forum

You are here : Home » Java » Java Interview Questions on Variables

Java Interview Questions on Variables - 15 Questions


Question: 1

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

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



Question: 2

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

Beginner 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

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



Question: 4

(A) True
(B) False

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



Question: 5

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

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



Question: 6

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

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



Question: 7

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

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



Question: 8

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

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



Question: 9

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

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



Question: 10

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

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



Question: 11

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

Beginner 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

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



Question: 13

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

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



Question: 14

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

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



Question: 15

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

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


[Contribute to this Website]


Java Objective Questions By Different 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 | Serialization | Multithreading | Networking | Sending Email | Applet Basics | Other