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

what is function overloading in java?

703


What is a package in java? List down various advantages of packages.

762


How the metacharacters are different from the ordinary characters?

571


What is 32 bit float?

563


How do you use spaces in java?

534






What are the important methods of java exception class?

576


What is gui programming?

524


What is the meaning of I ++ in java?

609


What is regex used for?

550


Which is fastest collection in java?

566


Which class represents the socket that both the client and server use to communicate with each other?

578


What is the difference between preemptive scheduling and time slicing?

595


What is the benefit of singleton pattern?

529


What java is used for?

664


How many characters is 16 bytes?

545