Can a double value be cast to a byte?

Answer Posted / ravikiran(aptech mumbai)

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

Is This Answer Correct ?    34 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is treeset implemented in java?

495


What is final variable?

498


What is class??

761


Explain public static void main(string args[]) in java.

537


What are the various access specifiers for java classes?

548






Difference difference paint() and paintcomponent()?

533


What is the definition of tree ?

592


What is the benefit of using enum to declare a constant?

661


What technique is carried out to find out if a particular string is empty?

575


What is files manifesting?

1734


how can you take care of mutual exclusion using java threads? : Java thread

611


What are advantages of using Java?s layout managers than windowing systems?

1865


What is tochararray in java?

504


How can we make string upper case or lower case?

602


How to retrieve data from database in java using arraylist?

530