Mcq On Java Lang
6. Which of these is a process of converting a simple data type into a class?
A. type casting
B. type conversion
C. type wrapping
D. None of the Mentioned
View Answer
Ans : B
Explanation: type conversion is a process of converting a simple data type into a class
7. Which of the following is method of wrapper Float for converting the value of an object into byte?
A. Bytevalue()
B. byte bytevalue()
C. bytevalue()
D. Byte Bytevalue()
View Answer
Ans : B
Explanation: byte bytevalue() is method of wrapper Float for converting the value of an object into byte
8. Which of these methods is used to check for infinitely large and small values?
A. isInfinite()
B. Isinfinite()
C. isNaN()
D. IsNaN()
View Answer
Ans : A
Explanation:isinfinite() method returns true is the value being tested is infinitely large or small in magnitude.
9. Which of the following methods is a method of wrapper Integer for obtaining hash code for the invoking object?
A. Integer hashcode()
B. int hashcode()
C. int hashCode()
D. int hash()
View Answer
Ans : C
Explanation: int hashCode() methods is a method of wrapper Integer for obtaining hash code for the invoking object
10. Which of the following method of Process class can terminate a process??
A. void terminate()
B. void destroy()
C. void exit()
D. void kill()
View Answer
Ans : B
Explanation:Kills the subprocess. The subprocess represented by this Process object is forcibly terminated.
Also check :
Discussion