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

Home » Java » Java Multiple Choice Questions for Experienced

Java Multiple Choice Questions for Experienced - 82


Question: 1

(A) 11
(B) 12
(C) 13
(D) Compilation Error

Level: Practitioner Category of MCQ: operators



Question: 2

(A) default
(B) public
(C) protected
(D) All of these

Level: Practitioner Category of MCQ: other



Question: 3

(A) 5
(B) 4
(C) 3
(D) 2

Level: Practitioner Category of MCQ: loops



Question: 4

(A) 1
(B) 2
(C) 3
(D) 4

Level: Practitioner Category of MCQ: loops



Question: 5

(A) 0
(B) 1
(C) 2
(D) 3

Level: Practitioner Category of MCQ: loops



Question: 6

(A) 0
(B) 1
(C) 2
(D) Infinite times

Level: Practitioner Category of MCQ: loops



Question: 7

(A) 5
(B) 4
(C) 3
(D) 0

Level: Practitioner Category of MCQ: loops



Question: 8

(A) 5
(B) 4
(C) 2
(D) 1

Level: Practitioner Category of MCQ: loops



Question: 9

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

Level: Practitioner Category of MCQ: switch



Question: 10

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

Level: Practitioner Category of MCQ: switch



Question: 11

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

Level: Practitioner Category of MCQ: if-else



Question: 12

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

Level: Practitioner Category of MCQ: variables



Question: 13

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

Level: Practitioner Category of MCQ: variables



Question: 14

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

Level: Practitioner Category of MCQ: variables



Question: 15

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

Level: Practitioner Category of MCQ: classesAndobjects



Question: 16

(A) -2
(B) 0-1
(C) 0-2
(D) error: non-static method can't be called

Level: Practitioner Category of MCQ: methods



Question: 17

(A) Compilation Error
(B) 3
(C) 5
(D) 6

Level: Practitioner Category of MCQ: methods



Question: 18

(A) 10.0f
(B) 10.0
(C) 10
(D) error: no suitable method found for toString(float)

Level: Practitioner Category of MCQ: typecasting



Question: 19

(A) 10.0f
(B) 10.0
(C) 10.00
(D) 10.0000

Level: Practitioner Category of MCQ: typecasting



Question: 20

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

Level: Practitioner Category of MCQ: typecasting



Question: 21

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

Level: Practitioner Category of MCQ: if-else



Question: 22

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

Level: Practitioner Category of MCQ: if-else



Question: 23

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

Level: Practitioner Category of MCQ: if-else



Question: 24

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

Level: Practitioner Category of MCQ: if-else



Question: 25

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

Level: Practitioner Category of MCQ: if-else



Question: 26

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

Level: Practitioner Category of MCQ: if-else



Question: 27

(A) error: sum() is private default
(B) hi
(C) Exception
(D) Nothing is printed

Level: Practitioner Category of MCQ: classesAndobjects



Question: 28

(A) 0
(B) 2
(C) 4
(D) 1

Level: Practitioner Category of MCQ: loops



Question: 29

(A) ASISH
(B) asish
(C) HSISA
(D) HSIS

Level: Practitioner Category of MCQ: arrays



Question: 30

(A) Compilation Error
(B) Exception
(C) - -
(D) --

Level: Practitioner Category of MCQ: methods



Question: 31

(A) 3
(B) 5
(C) 18
(D) 16

Level: Practitioner Category of MCQ: methods



Question: 32

(A) 7
(B) 8
(C) 9
(D) 10

Level: Practitioner Category of MCQ: methods



Question: 33

(A) 555
(B) 544
(C) 554
(D) 543

Level: Practitioner Category of MCQ: methods



Question: 34

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

Level: Practitioner Category of MCQ: inheritance



Question: 35

(A) Automatic Memory Management
(B) Speed-up the Execution of Java code
(C) to handle runtime exceptions
(D) All of these

Level: Practitioner Category of MCQ: other



Question: 36

(A) Private members can be accessed within a same package
(B) Private members can be accessed within class only
(C) Private members can be accessed within sub classes of same package
(D) All of the above

Level: Practitioner Category of MCQ: modifiers



Question: 37

(A) Yes
(B) No

Level: Practitioner Category of MCQ: classesAndobjects



Question: 38

(A) null
(B) Nothing is printed
(C) Compilation Error
(D) ArrayIndexOutOfBoundsException

Level: Practitioner Category of MCQ: methods



Question: 39

(A) AT&T Lab65
(B) AT&T Lab 65
(C) AT&T Lab
(D) Compilation Error

Level: Practitioner Category of MCQ: methods



Question: 40

(A) 6565
(B) 65
(C) "65"
(D) None of the above

Level: Practitioner Category of MCQ: methods



Question: 41

(A) 'a'
(B) a
(C) 65
(D) 97

Level: Practitioner Category of MCQ: datatype



Question: 42

(A) 99
(B) 67
(C) Unpredictable Value
(D) NumberFormatException

Level: Practitioner Category of MCQ: typecasting



Question: 43

(A) -100
(B) null
(C) -100null
(D) null-100

Level: Practitioner Category of MCQ: exceptions



Question: 44

(A) -100null
(B) -100
(C) null
(D) Compilation Error - unreachable statement at line 8

Level: Practitioner Category of MCQ: exceptions



Question: 45

(A) Hello
(B) Compilation Error
(C) Exception
(D) None of these

Level: Practitioner Category of MCQ: classesAndobjects



Question: 46

(A) Compilation Error
(B) Exception
(C) Hi
(D) Hello

Level: Practitioner Category of MCQ: methods



Question: 47

(A) 20
(B) 10
(C) Compilation Error
(D) None of the above

Level: Practitioner Category of MCQ: methods



Question: 48

(A) Compilation Error
(B) 12345
(C) 246810
(D) Exception

Level: Practitioner Category of MCQ: arrays



Question: 49

(A) Yes
(B) No

Level: Practitioner Category of MCQ: abstractclass



Question: 50

(A) It reads first line of cppbuzz.txt file
(B) It reads first character of cppbuzz.txt file
(C) It reads all the contents of cppbuzz.txt file
(D) None of these

Level: Practitioner Category of MCQ: filehandling



Question: 51

(A) Nothing is printed
(B) IndexOutOfBoundsException
(C) Compilation Error
(D) 0

Level: Practitioner Category of MCQ: collection



Question: 52

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

Level: Practitioner Category of MCQ: collection



Question: 53

(A) Nothing is printed
(B) 5
(C) 0
(D) true

Level: Practitioner Category of MCQ: collection



Question: 54

(A) -1
(B) 0
(C) IndexOutOfBoundsException
(D) None of the above

Level: Practitioner Category of MCQ: collection



Question: 55

(A) true
(B) -2
(C) Compilation Error
(D) 0

Level: Practitioner Category of MCQ: collection



Question: 56

(A) 331
(B) 3321
(C) 310
(D) 321

Level: Practitioner Category of MCQ: collection



Question: 57

(A) True
(B) False

Level: Practitioner Category of MCQ: collection



Question: 58

(A) 1
(B) Depends on the calling program
(C) Depends on class creating object of Singleton class
(D) 256

Level: Practitioner Category of MCQ: singleton



Question: 59

(A) cppbuzz-11
(B) cppbuzz-11.0
(C) hello-11
(D) hello-11.0

Level: Practitioner Category of MCQ: overriding



Question: 60

(A) class-A class-A
(B) class-B class-B
(C) class-B class-A
(D) class-A class-B

Level: Practitioner Category of MCQ: polymorphism



Question: 61

(A) void methodA(){} int methodA(){}
(B) void methodA(){} void methodA(int a){}
(C) void methodA(){} int methodB(int a){}
(D) int methodA(){} int methodAA(i{}

Level: Practitioner Category of MCQ: polymorphism



Question: 62

(A) True
(B) False

Level: Practitioner Category of MCQ: packages



Question: 63

(A) Thread
(B) Object
(C) Runnable
(D) Class

Level: Practitioner Category of MCQ: interfaces



Question: 64

(A) Yes
(B) No

Level: Practitioner Category of MCQ: interfaces



Question: 65

(A) Compilation Error
(B) Hello CppBuzz
(C) 13
(D) Hello CppBuzz13

Level: Practitioner Category of MCQ: interfaces



Question: 66

(A) It is not allowed. Compilation Error
(B) It is allowed. CppBuzz
(C) It is allowed. Compilation Error
(D) None of the above

Level: Practitioner Category of MCQ: interfaces



Question: 67

(A) The main thread waits for other threads to finish
(B) The main thread is finished first then other threads
(C) Other threads will sleep until main is complete
(D) All of these

Level: Practitioner Category of MCQ: other



Question: 68

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

Level: Practitioner Category of MCQ: variables



Question: 69

(A) 00
(B) 05
(C) 50
(D) 55

Level: Practitioner Category of MCQ: classesAndobjects



Question: 70

(A) 100
(B) 1000
(C) 2
(D) 20

Level: Practitioner Category of MCQ: classesAndobjects



Question: 71

(A) true
(B) false
(C) Compilation Error
(D) None of the above

Level: Practitioner Category of MCQ: methods



Question: 72

(A) 0 cpp 0 buzz 1 cpp 1 buzz
(B) 0 cpp 0 buzz 1 cpp 2 buzz
(C) 0 cpp 0 buzz 1 cpp 1 buzz 2 cpp 2 buzz
(D) 0 cpp 0 buzz 1 cpp 2 cpp 2 buzz

Level: Practitioner Category of MCQ: arrays



Question: 73

(A) 0
(B) 10
(C) null
(D) IndexOutOfBoundsException

Level: Practitioner Category of MCQ: arrays



Question: 74

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

Level: Practitioner Category of MCQ: switch



Question: 75

(A) Reading...
(B) Reading Book
(C) Reading Code
(D) Compilation Error

Level: Practitioner Category of MCQ: inheritance



Question: 76

(A) Private
(B) Protected
(C) Public
(D) Package-Private

Level: Practitioner Category of MCQ: inheritance



Question: 77

(A) 100
(B) 1000
(C) 2
(D) 20

Level: Practitioner Category of MCQ: classesAndobjects



Question: 78

(A) cougar c f
(B) feline cougar c c
(C) feline cougar c f
(D) Compilation fails

Level: Practitioner Category of MCQ: inheritance



Question: 79

(A) alpha beta
(B) beta beta
(C) gamma gamma
(D) Compilation fails

Level: Practitioner Category of MCQ: inheritance



Question: 80

(A) 16 mph, lope
(B) 24 mph, lope
(C) 27 mph, lope
(D) Compilation fails

Level: Practitioner Category of MCQ: interfaces



Question: 81

(A) 13
(B) 12
(C) 11
(D) 10

Level: Practitioner Category of MCQ: operators



Question: 82

(A) 10
(B) 11
(C) 12
(D) 13

Level: Practitioner Category of MCQ: operators


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