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

What is internal variable?

0 Answers  


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread

0 Answers  


How can you say java is object oriented?

0 Answers  


class A { private int i; } class B extends A { private int i; } if I create an object of B class what will be the memory of that object.

2 Answers   Yamaha,


How is rounding performed under integer division?

2 Answers   Satyam,


What is a boolean used for?

0 Answers  


What is method overloading with type promotion?

1 Answers  


What is meant by local variable and instance variable?

0 Answers  


What is arrays fill in java?

0 Answers  


List some features of the abstract class.

0 Answers  


Can we override the static method?

0 Answers  


How is Garbage collection done in Java?

3 Answers   T3 Softwares,


Categories