Answer Posted / rakesh jain
Whenever u want to assign the value of one type variabel to
another type variable . in this case u must type cast
between them.
Generally there is two type of Type casting
1 Implicit Type Casting
2 Explicit Type Casting
example:=
short s=10;
int i=240;
s=(short)i; //Explicit type casting
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Can we override private constructor in java?
Can we access instance variables within static methods ?
How does compareto work in java?
what is daemon thread and which method is used to create the daemon thread? : Java thread
What is a condition in java?
Explain the key functions of data binding?
What is the tradeoff between using an unordered array versus an ordered array?
What is tcp ip in java?
Difference between collection, collection and collections in java?
What is style and indentation?
Which non-unicode letter characters may be used as the first character of an identifier?
Is string a data type in java?
What is static block?
What are different access specifiers in java?
Why is serialization required?