Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

byte array initialization with Hex values

807599Feb 9 2007 — edited Feb 9 2007
In have a problem with this:

byte[] cmd = {0x00, 0xFF, 0x04, 0x04};

The compiler complaints om 0xFF saying:
Type mismath: cannot convert from int to byte

what do I do wrong?
/Helena
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2007
Added on Feb 9 2007
16 comments
4,559 views