Basic and Advance Java Question:
Download Questions PDF

What is casting in Java Programming?

Answer:

There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference.

Download Java Interview Questions And Answers PDF

Previous QuestionNext Question
What restrictions are placed on method overriding in Java Programming?Name Container classes in Java Programming?