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

Answer Posted / paras bist

compilation fails ,
even for
double d=10.5;
String f=(String)(10.5);

"Cannot cast from double to String"

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are reference variables in java?

600


What are "methods" and "fields"?

579


How many types of operators are there?

530


List some java keywords sun like c, c + + keywords?

592


What is string value?

640






Why is java called the platform independent programming language?

580


what is abstract class in Java?

652


When do we need to use internal iteration? When do we need to use external iteration?

613


How do you differentiate abstract class from interface?

532


Can we cast any other type to boolean type with type casting?

543


Explain about OOPS concepts and fundamentals.

598


Differentiate storage classes on the basis of their scope?

676


which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?

9247


Why is stringbuffer thread safe?

572


What are the important features of Java 11 release?

584