What happens when you assigned a 'double' value to
a 'String'?

Answer Posted / ravikiran(aptech mumbai)

compilation fails

double d=10.5;
String f=(String)(10.5);

will work

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

when to use ArrayList and when to use HashMap in webApplication.

3887


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

1733


What are recursive functions? Give some examples?

619


What is hashtable and explain features of hashtable?

566


How can we achieve thread safety in java?

687






Write a function to find out longest palindrome in a given string?

594


What is close method? How it's different from Finalize & Dispose?

565


Why is the main method static?

604


Is java an open source?

528


How does list work in java?

510


How is tree Mirroring implemented?

633


Are there structures in java?

556


Difference between default and protected access specifiers?

504


What is private static in java?

581


Can you explain the private protected field modifier?

571