Java Multiple Choice Questions for Experienced - 67
Question: 1
(A) 11
(B) 12
(C) 13
(D) Compilation Error
Level: Practitioner Category: operators
[Posted by: Admin | Chicago, USA]
Question: 2
(A) default
(B) public
(C) protected
(D) All of these
Level: Practitioner Category: other
[Posted by: Admin | Chicago, USA]
Question: 3
(A) 5
(B) 4
(C) 3
(D) 2
Level: Practitioner Category: loops
[Posted by: Admin | Chicago, USA]
Question: 4
(A) 1
(B) 2
(C) 3
(D) 4
Level: Practitioner Category: loops
[Posted by: Admin | Chicago, USA]
Question: 5
(A) 0
(B) 1
(C) 2
(D) 3
Level: Practitioner Category: loops
[Posted by: Admin | Chicago, USA]
Question: 6
(A) 0
(B) 1
(C) 2
(D) Infinite times
Level: Practitioner Category: loops
[Posted by: Admin | Chicago, USA]
Question: 7
(A) 5
(B) 4
(C) 3
(D) 0
Level: Practitioner Category: loops
[Posted by: Admin | Chicago, USA]
Question: 8
(A) 5
(B) 4
(C) 2
(D) 1
Level: Practitioner Category: loops
[Posted by: Admin | Chicago, USA]
Question: 9
(A) 5
(B) 10
(C) 510
(D) Compilation Error
Level: Practitioner Category: conditional
[Posted by: Admin | Chicago, USA]
Question: 10
(A) 5
(B) 10
(C) 100
(D) 0
Level: Practitioner Category: conditional
[Posted by: Admin | Chicago, USA]
Question: 11
(A) Compilation Error
(B) Length is 5-10
(C) Length not in 5-10
(D) nothing is printed
Level: Practitioner Category: conditional
[Posted by: Admin | Chicago, USA]
Question: 12
(A) 10"10"
(B) Compilation Error
(C) 20
(D) 1010
Level: Practitioner Category: variables
[Posted by: Admin | Chicago, USA]
Question: 13
(A) 10-10
(B) 0
(C) 1010
(D) Compilation Error
Level: Practitioner Category: variables
[Posted by: Admin | Chicago, USA]
Question: 14
(A) 10+10
(B) 1010
(C) Compilation Error
(D) Undefined
Level: Practitioner Category: variables
[Posted by: Admin | Chicago, USA]
Question: 15
(A) -10
(B) Undefined
(C) Compilation Error
(D) 0
Level: Practitioner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]
Question: 16
(A) -2
(B) 0-1
(C) 0-2
(D) error: non-static method can't be called
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 17
(A) Compilation Error
(B) 3
(C) 5
(D) 6
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 18
(A) 10.0f
(B) 10.0
(C) 10
(D) error: no suitable method found for toString(float)
Level: Practitioner Category: typecasting
[Posted by: Admin | Chicago, USA]
Question: 19
(A) 10.0f
(B) 10.0
(C) 10.00
(D) 10.0000
Level: Practitioner Category: typecasting
[Posted by: Admin | Chicago, USA]
Question: 20
(A) 0
(B) 10
(C) 100
(D) Exception
Level: Practitioner Category: typecasting
[Posted by: Admin | Chicago, USA]
Question: 21
(A) SunMoon
(B) Sun
(C) Moon
(D) Compilation Error
Level: Practitioner Category: conditional
[Posted by: Admin | Chicago, USA]
Question: 22
(A) Moon
(B) Sun
(C) SunMoon
(D) error: int can not be converted to boolean
Level: Practitioner Category: conditional
[Posted by: Admin | Chicago, USA]
Question: 23
(A) Sun
(B) Moon
(C) SunMoon
(D) Compilation Error
Level: Practitioner Category: conditional
[Posted by: Admin | Chicago, USA]
Question: 24
(A) Sun
(B) Nothing is printed
(C) Compilation Error
(D) Exception
Level: Practitioner Category: conditional
[Posted by: Admin | Chicago, USA]
Question: 25
(A) Compilation Error
(B) Sun
(C) Nothing is printed
(D) error: unreachable statement
Level: Practitioner Category: conditional
[Posted by: Admin | Chicago, USA]
Question: 26
(A) Sun
(B) SunMoon
(C) Nothing is printed
(D) Compilation Error
Level: Practitioner Category: conditional
[Posted by: Admin | Chicago, USA]
Question: 27
(A) error: sum() is private default
(B) hi
(C) Exception
(D) Nothing is printed
Level: Practitioner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]
Question: 28
(A) 0
(B) 2
(C) 4
(D) 1
Level: Practitioner Category: loops
[Posted by: Admin | Chicago, USA]
Question: 29
(A) ASISH
(B) asish
(C) HSISA
(D) HSIS
Level: Practitioner Category: arrays
[Posted by: Asish | Des Moines USA]
Question: 30
(A) Compilation Error
(B) Exception
(C) - -
(D) --
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 31
(A) 3
(B) 5
(C) 18
(D) 16
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 32
(A) 7
(B) 8
(C) 9
(D) 10
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 33
(A) 555
(B) 544
(C) 554
(D) 543
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 34
(A) 0
(B) 10
(C) Compilation Error
(D) Exception
Level: Practitioner Category: inheritance
[Posted by: Admin | Chicago, USA]
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: other
[Posted by: Admin | Chicago, USA]
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: modifiers
[Posted by: Admin | Chicago, USA]
Question: 37
(A) Yes
(B) No
Level: Practitioner Category: classesAndobjects
[Posted by: ASISH ARAVIND | Des Moines USA]
Question: 38
(A) null
(B) Nothing is printed
(C) Compilation Error
(D) ArrayIndexOutOfBoundsException
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 39
(A) AT&T Lab65
(B) AT&T Lab 65
(C) AT&T Lab
(D) Compilation Error
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 40
(A) 6565
(B) 65
(C) "65"
(D) None of the above
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 41
(A) 'a'
(B) a
(C) 65
(D) 97
Level: Practitioner Category: datatype
[Posted by: Admin | Chicago, USA]
Question: 42
(A) 99
(B) 67
(C) Unpredictable Value
(D) NumberFormatException
Level: Practitioner Category: typecasting
[Posted by: Admin | Chicago, USA]
Question: 43
(A) -100
(B) null
(C) -100null
(D) null-100
Level: Practitioner Category: exceptions
[Posted by: Admin | Chicago, USA]
Question: 44
(A) -100null
(B) -100
(C) null
(D) Compilation Error - unreachable statement at line 8
Level: Practitioner Category: exceptions
[Posted by: Admin | Chicago, USA]
Question: 45
(A) Hello
(B) Compilation Error
(C) Exception
(D) None of these
Level: Practitioner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]
Question: 46
(A) Compilation Error
(B) Exception
(C) Hi
(D) Hello
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 47
(A) 20
(B) 10
(C) Compilation Error
(D) None of the above
Level: Practitioner Category: methods
[Posted by: Admin | Chicago, USA]
Question: 48
(A) Compilation Error
(B) 12345
(C) 246810
(D) Exception
Level: Practitioner Category: arrays
[Posted by: Admin | Chicago, USA]
Question: 49
(A) Yes
(B) No
Level: Practitioner Category: abstractclass
[Posted by: Admin | Chicago, USA]
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: filehandling
[Posted by: ASISH ARAVIND | Des Moines USA]
Question: 51
(A) Nothing is printed
(B) IndexOutOfBoundsException
(C) Compilation Error
(D) 0
Level: Practitioner Category: collection
[Posted by: Admin | Chicago, USA]
Question: 52
(A) Nothing is printed
(B) Compilation Error
(C) Exception
(D) 5
Level: Practitioner Category: collection
[Posted by: Admin | Chicago, USA]
Question: 53
(A) Nothing is printed
(B) 5
(C) 0
(D) true
Level: Practitioner Category: collection
[Posted by: Admin | Chicago, USA]
Question: 54
(A) -1
(B) 0
(C) IndexOutOfBoundsException
(D) None of the above
Level: Practitioner Category: collection
[Posted by: Admin | Chicago, USA]
Question: 55
(A) true
(B) -2
(C) Compilation Error
(D) 0
Level: Practitioner Category: collection
[Posted by: Admin | Chicago, USA]
Question: 56
Question: 57
(A) True
(B) False
Level: Practitioner Category: collection
[Posted by: Admin | Chicago, USA]
Question: 58
(A) 1
(B) Depends on the calling program
(C) Depends on class creating object of Singleton class
(D) 256
Level: Practitioner Category: singleton
[Posted by: Admin | Chicago, USA]
Question: 59
(A) cppbuzz-11
(B) cppbuzz-11.0
(C) hello-11
(D) hello-11.0
Level: Practitioner Category: overriding
[Posted by: Admin | Chicago, USA]
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: polymorphism
[Posted by: Admin | Chicago, USA]
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: polymorphism
[Posted by: Admin | Chicago, USA]
Question: 62
(A) True
(B) False
Level: Practitioner Category: packages
[Posted by: Admin | Chicago, USA]
Question: 63
(A) Thread
(B) Object
(C) Runnable
(D) Class
Level: Practitioner Category: interfaces
[Posted by: Admin | Chicago, USA]
Question: 64
(A) Yes
(B) No
Level: Practitioner Category: interfaces
[Posted by: Admin | Chicago, USA]
Question: 65
(A) Compilation Error
(B) Hello CppBuzz
(C) 13
(D) Hello CppBuzz13
Level: Practitioner Category: interfaces
[Posted by: Admin | Chicago, USA]
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: interfaces
[Posted by: Admin | Chicago, USA]
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: other
[Posted by: Admin | Chicago, USA]