Test Series - java

Test Number 13/64

Q: What are the Type Conversions available in Java language?
A. Narrowing Type Conversion
B. Widening Type Conversion
C. A and B
D. None of the above
Solution: no solution
Q: What is a higher data type in Java language?
A. A data type which holds more data than other data types
B. A data type whose size is more than other data types
C. A data type which can hold more precision digits than other data types
D. All the above
Solution: Float is bigger than short


double is bigger than float
Q: What is a Widening Type Conversion in Java?
A. Conversion of data from higher data type to lower data type
B. Conversion of data from lower data type to higher data type
C. Conversion of data from any data type to any data type
D. None of the above
Solution: no solution
Q: What is a Narrowing Type Conversion in Java?
A. Conversion of data from lower data type to higher data type
B. Conversion data from a higher data type to a lower data type
C. Conversion of data from any data type to any data type
D. None of the above
Solution: no solution
Q: What is the result of a Narrowing type conversion?
A. Loss of data
B. Addition of data
C. Corruption of data
D. None of the above
Solution: int a =(int)1.2f;
//a holds 1
Q: What is the result of a Widening Type Conversion in Java?
A. Loss of data
B. Gain of data
C. No change
D. None of the above
Solution: int a=456;
float b = a; //No change of data
//b holds 456.0;
Q: Type promotion in Java usually refers to ____.
A. Narrowing Type Conversion
B. Widening Type Conversion
C. No Type Conversion
D. None of the above
Solution: All integers are promoted to int or long.


All characters are promoted to int from char or long from char.


All float numbers are promoted to double.
Q: Type Casting in Java usually refers to ____?
A. Narrowing Type Conversion
B. Widening Type Conversion
C. No Type Conversion
D. None of the above
Solution: no solution
Q: Explicit Type Conversion in Java refers to ___?
A. Narrowing Type Conversion
B. Widening Type Conversion
C. No Type Conversion
D. None of the above
Solution: no solution
Q: Implicit Type Conversion in Java is also called ___?
A. Narrowing Type Conversion
B. Widening Type Conversion
C. No Type Conversion
D. None of the above
Solution: Implicit type conversion is an Automatic Type Promotion from a lower data type to a higher data type.

You Have Score    /10