File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Certification Results and the fly likes SCJP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Certification Results
Bookmark "SCJP" Watch "SCJP" New topic


Mathangi Shankar
Ranch Hand

Joined: Nov 01, 2004
Posts: 56

I want a small information. How would I convert the double value 0xffff to byte value? Please reply.

--------------------------------<br />SCJP1.4
Premil Jacob
Ranch Hand

Joined: Sep 10, 2004
Posts: 30
Well first of all I hope you understand that converting a double to byte would mean that some data would be lost.

To convert the double value to byte would be

byte b=(byte)0xffff

Thanks,<br />Premil<br /> <br />SCJP 1.4
Don't get me started about those stupid light bulbs.
subject: SCJP
It's not a secret anymore!