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 if else switch

Java Interview Questions on Conditions - 18 Questions


Question: 1

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

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



Question: 2

(A) 5
(B) 10
(C) 510
(D) Compilation Error

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



Question: 3

(A) 5
(B) 510
(C) 5100
(D) Compilation Error

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



Question: 4

(A) 5
(B) 510
(C) 5100
(D) 100

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



Question: 5

(A) 5
(B) 10
(C) 100
(D) 0

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



Question: 6

(A) 10
(B) 510
(C) 5100
(D) 100

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



Question: 7

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

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



Question: 8

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

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



Question: 9

(A) Compilation Error
(B) Length is 5-10
(C) Length not in 5-10
(D) nothing is printed

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



Question: 10

(A) SunMoon
(B) Sun
(C) Moon
(D) Compilation Error

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



Question: 11

(A) Moon
(B) Sun
(C) SunMoon
(D) error: int can not be converted to boolean

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



Question: 12

(A) Sun
(B) Moon
(C) SunMoon
(D) Compilation Error

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



Question: 13

(A) Sun
(B) Nothing is printed
(C) Compilation Error
(D) Exception

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



Question: 14

(A) Compilation Error
(B) Sun
(C) Nothing is printed
(D) error: unreachable statement

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



Question: 15

(A) Compilation Error
(B) exception: unreachable code
(C) Sun
(D) SunMoon

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



Question: 16

(A) Sun
(B) SunMoon
(C) Nothing is printed
(D) Compilation Error

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



Question: 17

(A) Ash
(B) Ashxyz
(C) Nothing is printed
(D) AshxyzabcImn

Expert conditional[Posted by: ASISH ARAVIND | Des Moines USA]



Question: 18

(A) Germany
(B) India
(C) Canada
(D) USA

Practionar conditional[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