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

You are here : Home » Java » Objective Questions

Java Objective Questions (MCQs) - 224

Page 1 (1 - 100)


Question: 1

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

DiscussOnForum
Expert datatype[Posted by: Admin | Chicago, USA]



Question: 2

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

DiscussOnForum
Practitioner operators[Posted by: Admin | Chicago, USA]



Question: 3

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

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 4

(A) 100
(B) 110
(C) 121
(D) Compilation Error

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 5

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

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



Question: 6

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

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 7

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

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 8

(A) 100
(B) 90
(C) 81
(D) 80

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 9

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

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



Question: 10

(A) 138
(B) 264
(C) 41
(D) 25

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 11

(A) -
(B) +
(C) *

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 12

(A) |
(B) ^
(C) ~
(D) <->

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 13

(A) Left Shift Operator
(B) Right Shift Operator
(C) Zero Fill Right Shift
(D) Zero Fill Left Shift

DiscussOnForum
Expert operators[Posted by: Admin | Chicago, USA]



Question: 14

(A) ()
(B) ++
(C) *
(D) >=

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 15

(A) ()
(B) *
(C) +
(D) ++

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 16

(A) >=
(B) <=
(C) !=
(D) +=

DiscussOnForum
Beginner operators[Posted by: Admin | Chicago, USA]



Question: 17

(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

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



Question: 18

(A) Windows
(B) Mac OS
(C) UNIX
(D) All of these

DiscussOnForum
Beginner other[Posted by: Admin | Chicago, USA]



Question: 19

(A) True
(B) False

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



Question: 20

(A) True
(B) False

DiscussOnForum
Beginner methods[Posted by: Admin | Chicago, USA]



Question: 21

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

DiscussOnForum
Practitioner other[Posted by: Admin | Chicago, USA]



Question: 22

(A) True
(B) False

DiscussOnForum
Beginner methods[Posted by: Admin | Chicago, USA]



Question: 23

(A) byte
(B) short
(C) long
(D) class

DiscussOnForum
Beginner datatype[Posted by: Admin | Chicago, USA]



Question: 24

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

DiscussOnForum
Beginner loops[Posted by: Admin | Chicago, USA]



Question: 25

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

DiscussOnForum
Beginner loops[Posted by: Admin | Chicago, USA]



Question: 26

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

DiscussOnForum
Practitioner loops[Posted by: Admin | Chicago, USA]



Question: 27

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

DiscussOnForum
Practitioner loops[Posted by: Admin | Chicago, USA]



Question: 28

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

DiscussOnForum
Practitioner loops[Posted by: Admin | Chicago, USA]



Question: 29

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

DiscussOnForum
Practitioner loops[Posted by: Admin | Chicago, USA]



Question: 30

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

DiscussOnForum
Practitioner loops[Posted by: Admin | Chicago, USA]



Question: 31

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

DiscussOnForum
Practitioner loops[Posted by: Admin | Chicago, USA]



Question: 32

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

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



Question: 33

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

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



Question: 34

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

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



Question: 35

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

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



Question: 36

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

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



Question: 37

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

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



Question: 38

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

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



Question: 39

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

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



Question: 40

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

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



Question: 41

(A) "cpp''buzz"
(B) "cpp''buzz"
(C) cpp''buzz
(D) "cpp' 'buzz"

DiscussOnForum
Expert other[Posted by: Admin | Chicago, USA]



Question: 42

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

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



Question: 43

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

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



Question: 44

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

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



Question: 45

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

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



Question: 46

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

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



Question: 47

(A) Compiler
(B) Class Loader
(C) Byte Code Verifier
(D) Java Virtual Machine

DiscussOnForum
Beginner other[Posted by: Admin | Chicago, USA]



Question: 48

(A) Editing -> Compilation -> Class Loader -> Bytecode Verifier -> Execution
(B) Editing -> Bytecode Verifier -> Compilation -> Class Loader -> Execution
(C) Editing -> Compilation -> Bytecode Verifier -> Class Loader -> Execution
(D) None of the above

DiscussOnForum
Beginner other[Posted by: Admin | Chicago, USA]



Question: 49

(A) friends
(B) friend
(C) fr
(D) compilation Error

DiscussOnForum
Beginner loops[Posted by: ASISH ARAVIND | Des Moines USA]



Question: 50

(A) True
(B) False

DiscussOnForum
Beginner other[Posted by: Admin | Chicago, USA]



Question: 51

(A) True
(B) False

DiscussOnForum
Beginner other[Posted by: Admin | Chicago, USA]



Question: 52

(A) 12345
(B) 123
(C) 124
(D) 135

DiscussOnForum
Beginner arrays[Posted by: Admin | Chicago, USA]



Question: 53

(A) 12345
(B) Nothing is printed
(C) 1
(D) Infinite times

DiscussOnForum
Beginner arrays[Posted by: Admin | Chicago, USA]



Question: 54

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

DiscussOnForum
Beginner arrays[Posted by: Admin | Chicago, USA]



Question: 55

(A) 12345
(B) 135
(C) 22222
(D) 14385

DiscussOnForum
Beginner arrays[Posted by: Admin | Chicago, USA]



Question: 56

(A) a b c d e
(B) abcde
(C) 97 98 99 100 101
(D) 65 66 67 68 69

DiscussOnForum
Expert arrays[Posted by: Admin | Chicago, USA]



Question: 57

(A) a b c d e
(B) 96 97 98 99 101
(C) 65 66 67 68 69
(D) None of the above

DiscussOnForum
Expert arrays[Posted by: Admin | Chicago, USA]



Question: 58

(A) abcde
(B) 6566676869
(C) Compilation Error
(D) Some Garbage Value

DiscussOnForum
Beginner arrays[Posted by: Admin | Chicago, USA]



Question: 59

(A) 0
(B) Compilation Error
(C) -10
(D) Garbage Value

DiscussOnForum
Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 60

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

DiscussOnForum
Practitioner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 61

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

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



Question: 62

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

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



Question: 63

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

DiscussOnForum
Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 64

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

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



Question: 65

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

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



Question: 66

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

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



Question: 67

(A) 1
(B) 2
(C) Compilation Error
(D) Infinite times

DiscussOnForum
Beginner loops[Posted by: Admin | Chicago, USA]



Question: 68

(A) 0
(B) 1
(C) Infinite Times
(D) Error: Unreachable Statement

DiscussOnForum
Beginner loops[Posted by: Admin | Chicago, USA]



Question: 69

(A) Infinite times
(B) 0 times
(C) 1 time
(D) error: unreachable statement

DiscussOnForum
Beginner loops[Posted by: Admin | Chicago, USA]



Question: 70

(A) Infinite times
(B) 0
(C) 1
(D) error: unreachable statement

DiscussOnForum
Beginner loops[Posted by: Admin | Chicago, USA]



Question: 71

(A) 0
(B) 1
(C) Infinite Times
(D) Compilation Error

DiscussOnForum
Beginner loops[Posted by: Admin | Chicago, USA]



Question: 72

(A) 00
(B) 0-1
(C) 0-2
(D) -2

DiscussOnForum
Beginner methods[Posted by: Admin | Chicago, USA]



Question: 73

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

DiscussOnForum
Practitioner methods[Posted by: Admin | Chicago, USA]



Question: 74

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

DiscussOnForum
Practitioner methods[Posted by: Admin | Chicago, USA]



Question: 75

(A) 63321
(B) 36
(C) 33
(D) 12336

DiscussOnForum
Expert methods[Posted by: Admin | Chicago, USA]



Question: 76

(A) 32136
(B) 33126
(C) 12336
(D) 63321

DiscussOnForum
Beginner methods[Posted by: Admin | Chicago, USA]



Question: 77

(A) 123456789
(B) 12345678
(C) 122
(D) None of the above

DiscussOnForum
Expert methods[Posted by: Admin | Chicago, USA]



Question: 78

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

DiscussOnForum
Beginner methods[Posted by: Admin | Chicago, USA]



Question: 79

(A) Yes
(B) No

DiscussOnForum
Beginner methods[Posted by: Admin | Chicago, USA]



Question: 80

(A) 123
(B) 1234
(C) 12340
(D) Compilation Error

DiscussOnForum
Beginner typecasting[Posted by: Admin | Chicago, USA]



Question: 81

(A) 1234.34
(B) 1234
(C) .1234.00
(D) NumberFormatException

DiscussOnForum
Beginner typecasting[Posted by: Admin | Chicago, USA]



Question: 82

(A) 1234.00
(B) 1234.34
(C) 1234
(D) Exception

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 83

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

DiscussOnForum
Beginner typecasting[Posted by: Admin | Chicago, USA]



Question: 84

(A) 10.0
(B) 10
(C) error: loss precision
(D) Exception

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 85

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

DiscussOnForum
Practitioner typecasting[Posted by: Admin | Chicago, USA]



Question: 86

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

DiscussOnForum
Beginner typecasting[Posted by: Admin | Chicago, USA]



Question: 87

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

DiscussOnForum
Practitioner typecasting[Posted by: Admin | Chicago, USA]



Question: 88

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

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 89

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

DiscussOnForum
Practitioner typecasting[Posted by: Admin | Chicago, USA]



Question: 90

(A) 10
(B) 10.00
(C) 10.87
(D) NumberFormatException

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 91

(A) 10.87
(B) 10.00
(C) 10
(D) error:possible loss of precision

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 92

(A) 10.87
(B) 10.870000
(C) 10.8700
(D) 10.00

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 93

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

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



Question: 94

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

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



Question: 95

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

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



Question: 96

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

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



Question: 97

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

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



Question: 98

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

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



Question: 99

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

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



Question: 100

(A) hi
(B) nothing is printed
(C) error: sum() has private access
(D) Exception

DiscussOnForum
Beginner classesAndobjects[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 Serialization Multithreading Networking Sending Email Applet Basics Other