What is casting?

Answers were Sorted based on User's Feedback



What is casting?..

Answer / dsr

The object will be convert into another object type through
casting. This is known as cating

Is This Answer Correct ?    7 Yes 0 No

What is casting?..

Answer / vijayakumar chinnasamy

Casting means converting values from one data type to
other data type.For example to convert the int values to
float type vlaues.

Types of casting:
1. Downcasting -source is larger than destination type
2. upcasting - Source is smaller than destination type.

casting can be applicable to both primitive type and Object
type.

primitive type - convert numeral to floating point and vice
versa.
Object type - converting from subclass to super class or
vice versa.
superClassObj = subClassObj;

Is This Answer Correct ?    4 Yes 0 No

What is casting?..

Answer / rajashree

Casting is a mass production process which involves molten
materials (such as metals, plastics or resins) being poured
into a mold, allowed to solidify and then extracted for
use. Casting can be thought of as a method for reproducing
something - whether a mere part or a single unit by itself.

Casting is a process that can be used to manufacture
complex parts which would prove too expensive or time-
consuming to produce using other methods such as cutting or
shaping these from solid materials.

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More Core Java Interview Questions

How Marker Interfaces are instruct to complete the desired need ?

2 Answers  


What is equals method in java?

0 Answers  


How to re-get an object that is collected by garbage collector?

1 Answers  


How can we make a class singleton?

0 Answers  


Why are constructors used?

0 Answers  






posted in online test

1 Answers  


Explain heap sort?

0 Answers   Flextronics,


Can long be null in java?

0 Answers  


We have two methods to create methods the threads. 1. Implementing runnable interface 2. Extending to thread class and overriding run method. Among these two which one is better and why? Please explain me in detail.

2 Answers  


What is the collection interface?

0 Answers  


What is meant by nested loop?

0 Answers  


What is the difference between abstraction and encapsulation?

0 Answers  


Categories