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 hashmap and hashtable? What is an interface?

524


How many types of exception can occur in a java program?

542


Can a java program have 2 main methods?

561


What is difference overloading and overriding?

584


Explain runtime exceptions?

753






What is return in java?

565


How many types of design patterns are there?

536


why not override thread to make a runnable? : Java thread

569


Can you access the private method from outside the class?

522


Is java owned by oracle?

530


what is the messsage u r going to get from an objectoriented programing?

1619


Explain different types of wrapper classes in java?

609


How do you know if a value is nan?

576


What are static variables and functions?

631


How many bits is size_t?

551