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

How do you clear a list in java?

0 Answers  


What is %d in printf?

0 Answers  


7) Suppose there is Student class like class student { int age; string name; } We want to store these objects in a HashMap. Do we need to override any methods in Student class? If any which ones and why? what if i just override equals or just hashcode? what will be the results in both the cases?

4 Answers   CSC, Nagarro, RBS,


how to deploy tomcatserver to weblogic server? write d following steps?

0 Answers  


What do u mean by wrapper Class? What do u mean by Jvm... How do u change JVM for other OS? Or No need to Change ...? its like tricky

6 Answers   Accenture, EDS,






Can we assign integer value to char in java?

0 Answers  


What is Java Reflection API? Why it’s so important to have?

0 Answers  


What is the relationship between clipping and repainting under awt?

0 Answers  


What is the benefit of lambda expressions?

0 Answers  


How can you read content from file in java?

0 Answers   HCL,


Do you need to import math in java?

0 Answers  


To the class members how can we provide security?

1 Answers   Aspire,


Categories