Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Adella Garcia   on Feb 07 In Java Category.

  
Question Answered By: Lurlene Fischer   on Feb 07

When 2 bytes are added, the addition returns an int. Just cast the
addition back to a byte.

x[i] = (byte)(x[i]+y[i]);

Share: