- An interface type can be converted to any other interface type.
Ans: False - A ‘char’ type can be assigned to a double variable(without casting).
Ans: True - A boolean may be converted to integer and vice-versa by casting.
Ans: False - In an expression, which has 2 operands, one of which is a long and the other is a float the result will be of ____ type.
Ans: float - Implicitly converting an interface type to a class type is never allowed.
Ans: False - byte b=(byte)256;
System.out.println(b);
Value of b printed is ___.
Ans: 0 - For unary operators, if the operands is a byte, char or a short, it is converted to __.
Ans: int - An array can be converted to an object of the class Object without casting.
Ans: True - An array of integers can be converted to an array of bytes by casting.
Ans: False - A subclass object can be assigned to a super class type without casting.
Ans: True
Sunday, July 6, 2008
SCJP: Language Fundamentals
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment