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


Please Help Members By Posting Answers For Below Questions

Which sorting algorithm is in place?

535


List out benefits of object oriented programming language?

487


Can we have any other return type than void for main method?

540


What is the difference between the direct buffer and non-direct buffer in java?

545


What are mutable classes?

525






How do you create an array in java?

536


What is the major drawback of internal iteration over external iteration?

589


Is it safe to install java on my computer?

544


How many bytes is a url?

564


What are the access modifiers available in java?

566


How do you check if a character in a string is a digit or letter?

510


Can I uninstall java?

555


How can you make a class serializable in java?

569


What is the need of transient variables in Java ?

581


Can we pass null as argument in java?

510