What is casting?
Answers were Sorted based on User's Feedback
Answer / kabita
Casting is used to convert the value from one datatype to
another datatype
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / vijayakumar chinnasamy
Casting mostly used for converting value from one data type
to another data type.Mostly used for convert incompatible
data.
eg:
WRRONG
long a=20; // a is 64bit(long) data
int b=10; // b is 32 bit data.
b=a; // u r trying to assign 64bit data into 32 bit data
CORRECT
long a=20; // a is 64bit(long) data
int b=10; // b is 32 bit data.
b=(int)a; // ur converting 64bit data into 32bit data
then assign to variable b.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / janet
Casting is used to convert the value of one type to another
| Is This Answer Correct ? | 1 Yes | 0 No |
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
What is jvm? Why is java called the platform independent programming language?
List any five features of java?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
What is the internal implementation of set in java?
what is web.xml?and its use?
How will you reverse a singly-link list?
0 Answers Akamai Technologies,
How TreeMap sorts the objects inside it?? suppose if have include one employee object and one car object. On what basis it will sort?
What about main thread in java?
Which sort is best in java?
What are the names of interfaces that doesn't consists of method/s ?
What are the steps in the jdbc connection?