Can a double value be cast to a byte?

Answers were Sorted based on User's Feedback



Can a double value be cast to a byte?..

Answer / ravikiran(aptech mumbai)

yes
double d=22.55;
byte b=(byte)d;

Is This Answer Correct ?    34 Yes 2 No

Can a double value be cast to a byte?..

Answer / niranjanravi

yes

Is This Answer Correct ?    24 Yes 2 No

Can a double value be cast to a byte?..

Answer / guest

yes

Is This Answer Correct ?    18 Yes 2 No

Post New Answer

More Core Java Interview Questions

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,


if arraylist size is increased from initial size what is the size of arraylist...suppose initial is 100 , if i add 101 element what is the size...

10 Answers  


What are the different ways to handle exceptions?

0 Answers  


What is the old name of java?

0 Answers  


What are the benefits of java?

0 Answers  






What is pangram in java?

0 Answers  


What is the difference between the boolean & operator and the && operator in java programming?

0 Answers  


Write code of any action class?

0 Answers  


What are the legal operands of the instanceof operator?

0 Answers  


Differentiate between run time error and syntax error.

0 Answers   Amdocs,


what is the meaning of java.lang and java.util

6 Answers  


When is the garbage collection used in Java?

0 Answers   BirlaSoft,


Categories