Can a Byte object be cast to a double value?

Answers were Sorted based on User's Feedback



Can a Byte object be cast to a double value?..

Answer / roshan

yes, a byte object can be cast into double value. This is
done through auto-boxing concept of java that was
introduced in jdk 1.5.0. Using auto-boxing we can assign a
object into preemitive value and preemitive into object.

Is This Answer Correct ?    25 Yes 1 No

Can a Byte object be cast to a double value?..

Answer / shweta

No, an object cannot be cast to a primitive value.

Is This Answer Correct ?    19 Yes 9 No

Can a Byte object be cast to a double value?..

Answer / rajesh dangi

Byte object can not be casted into primitive type. What we
can do is to create a double variable and get the value of
Byte object converted to it. There are many vays to do that

Is This Answer Correct ?    7 Yes 4 No

Post New Answer

More Core Java Interview Questions

Does garbage collection guarantee that a program will not run out of memory?

1 Answers  


Suppose there is an array list [10,5,20,19,15,24].Print them in ascending & descending order in collection framework concept ???

2 Answers   Cognizant,


How many characters is 16 bytes?

0 Answers  


What is difference between final and immutable?

0 Answers  


Why java is used everywhere?

0 Answers  






What is a instance variable?

0 Answers  


Accenture NJ mostly ask question on Collection like 1)How to sort Objcts and how treeset sort them 2)Explain mechanism of Hashcode finding in Java 3)Name some of the Sorted collection.

2 Answers   Accenture,


What is static import in java?

0 Answers  


how to make a un-checked exception as a checked exception one.

2 Answers  


When should I use singleton pattern?

0 Answers  


What is executor memory?

0 Answers  


Why are the destructors for base class and derived class called in reverse order when the program exits

0 Answers   HCL,


Categories