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

Answer Posted / vinay kumar

Actually java doesn't have string type
there is only 'char' type.
Here String is a class (in java) ,
but i am saying one thing,
these comes 1 & if not 2 & if not 3

1) if in a line have float value that total conversion value
comes a float value.
other wise
2) if in a line have double value that total conversion
value comes a double value.
otherwise
3) if in a line have long value that total conversion value
comes a long value.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different access modifiers available in java?

542


What is bubble sorting in java?

572


Can sleep() method causes another thread to sleep?

542


What is the difference between the file and randomaccessfile classes?

507


What is the unit of plancks constant?

545






What is the default size of load factor in hashing based collection?

543


What do you understand by private, protected and public?

496


What is java literals?

555


What is set string?

570


What are the differences between the constructors and methods?

552


What is array list in java?

567


What is java virtual machine and how it is considered in context of java’s platform independent feature?

617


What is a treeset class?

536


What is a default constructor and also define copy contrucyor?

571


How garbage collection is done in java?

521