long d =10;int i =0;i=d; /// is this possible? If d is very
long number (10 digits or some thing) then?
Answer Posted / 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 |
Post New Answer View All Answers
How is string immutable in java?
Does java allow default arguments?
How do you get the length of a string in java?
What kind of variables can a class consist?
I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?
What access modifiers can be used for methods?
Why multiple inheritance is not supported by java?
Why we used break and continue statement in java?
What are the wrapped, classes?
Is java a compiler?
Explain the difference between association, aggregation and inheritance relationships.
Differentiate between a constructor and a method? Can we mark constructors final?
What is flush () in java?
Is string a class?
What is java command?