long d =10;int i =0;i=d; /// is this possible? If d is very
long number (10 digits or some thing) then?
Answers were Sorted based on User's Feedback
Answer / vicks
this is possible by using Type Casting, But there is an
exception occure "LostOfPressesions". because "Long" having
64bit (8 Bytes) of memory bolck, on the other hand "int"
having only 32bit (4 Bytes) of memory. which is less then
long. there is a case to lost some amount of data.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / vijayakumar chinnasamy
It display compile time error. Cant convert form long to
int. becacuse it -2 32 bit and long is 64bit, so u need to
type case the long value into int value.
| Is This Answer Correct ? | 1 Yes | 2 No |
How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?
What are order of precedence and associativity, and how are they used?
What are event-delegation model and event-inheritance model? Which is best?
What is the difference between throw and throws? What is the similarity between try and throw?
What is token in java?
What is use of static method?
Without creating a new object, How you can retrieve a String or other object?
Can we override private constructor in java?
How do you compare two strings lexicographically?
What is nullpointerexception?
What is an 8 bit word?
Why does java have two ways to create child threads?