Programming - Type Casting

You Are Here :: Home > JAVA > Type Casting - General Questions

 
7.

_______________ is incompatible for conversion                        


A. Boolean B. Integer
C. Float D. String




8.

___________________ A boolean value cannot be assigned to any other data type. Except boolean, all the remaining 7 data types can be assigned to one another either implicitly or explicitly; but boolean cannot.                        


A. Implicit casting (widening conversion) B. Explicit
C. Boolean Casting D. None




9.

byte can be assigned to short implicitly but shortto byte requires _____________ casting.                        


A. Implicit casting (widening conversion) B. Explicit
C. Both D. None




10.

___________________ discusses casting between objects of different classes involved in inheritance.                        


A. Implicit casting (widening conversion) B. Explicit
C. object D. None




11.

How many ways you can copy one object properties to another?                        


A. 3 ways –â Shallow copying B. Deep copying
C. Cloning D. All the above




12.

How to convert a string into string form?                        


A. byte B. Integer
C. long D. All the above




« prev

1

2

3

4

next »

 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on