Java Interview Questions
Q31. For storing a value, double uses
(a) 24 bit
(b) 32 bit
(c) 64 bit
(d) 128 bit
Answer: (c) 64 bit
Q32. Approximate range of double is
(a) 4.9e–324 to 1.8e+308
(b) 1.4e-045 to 3.4e+038
(c) -2147483648 to + 2147483647
(d) 0 to 65535
Answer: (a) 4.9e–324 to 1.8e+308
Q33. For logical value, which primitive type is used
(a) Float
(b) Long
(c) Double
(d) Boolean
Answer: (d) Boolean
Q34. Which of the following is intrinsic data type
(a) Classes
(b) Arrays
(c) Integer
(d) Interface
Answer: (c) Integer
Q35. Which of the following is derived data type
(a) Floating point
(b) Interface
(c) Character
(d) Boolean
Answer: (b) Interface
Q36. Assigning a value of one type to a variable of another type is known as
(a) Type compression
(b) Type casting
(c) Type correction
(d) Type inheritance
Answer: (b) Type casting
Q37. The syntax "type variable = (type) variable2" is used for
(a) Type casting
(b) Type compression
(c) Type inheritance
(d) Type correction
Answer: (a) Type casting
Q38. Which type of conversions do not lose information about the magnitude of a value
(a) String
(b) Capture
(c) Narrowing
(d) Widening
Answer: (d) Widening
Q39. Assigning a larger type to a smaller one is known as _________ conversion in Java
(a) Identity
(b) Narrowing
(c) Boxing
(d) Capture
Answer: (b) Narrowing
Q40. What is the default value of int
(a) 0.0F
(b) 0L
(c) 0
(d) 1
Answer: (c) 0
Q41. What is the default value of boolean in java
(a) True
(b) False
(c) Null
(d) 0.0d
Answer: (b) False
Q42. What are typically used to store information in Java
(a) Variables
(b) Constant
(c) Conversion
(d) None of the above
Answer: (a) Variables
Q43. Which of the variables serve as symbolic constants
(a) Boolean
(b) Char
(c) Float
(d) Final
Answer: (d) Final
Q44. Arithmetic operators in java can not be applied to
(a) Long
(b) Char
(c) Float
(d) Boolean
Answer: (d) Boolean
Q45. Java has a distinction of supporting special operators known as
(a) Bitwise operators
(b) Unary Operators
(c) Conditional Operators
(d) Type Comparison Operator
Answer: (a) Bitwise operators
Practice Test Exam