Adding two possitive numbers results a negative?
Hello everybody. I have a strange problem that it's racking my brain! i have the following codefor (int i=0;i<ascii.length;i++){
int randNum=rand.nextInt(100000000);
buffer[i]=randNum*256+ascii[i];
}
(ascii is an array of four integers that picture an ascii characters).
Normaly that would result a buffer full of positive numbers.In my case thats not always true. Many times i get as a result a negative number even if the other two numbers that i add are positive. What's wrong here? Thanks in advance!>

