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 is the difference between static binding and dynamic binding?

567


What is the maximum size of array in java?

518


what is the constructor and how many types of constructors are used in java?

537


How many characters is 16 bytes?

542


What is a function in java?

570






What is difference between adapter class and listener?

501


Which package is always imported by default?

543


Explain oops concepts in detail?

576


What are meta-annotations?

553


What's the difference between an abstract class and interface in java?

559


When do you get classcastexception?

558


What are constructors in java?

574


What are the differences between include directive and include action?

546


What is the difference between size and length in java?

513


How to display arraylist values in java?

490