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

What is a parameter example?

504


What is a loop java?

563


What is difference overloading and overriding?

556


Give me an example of array and linked list? Where they can be used?

534


What is loop in java?

501






Explain the use of javap tool.

608


What is command line argument in java?

578


Explain about member inner classes?

562


How do constructors use this() and super()?

517


When is an object subject to garbage collection?

552


What is the difference between stream and buffer?

495


What are adapter classes?

582


Why is flag used in java?

520


what is thread? What are the high-level thread states? : Java thread

756


Can we overload final method in java?

528