FileDocCategorySizeDatePackage
ByteAdd.javaAPI DocExample429Sat Nov 25 12:55:38 GMT 2000None

ByteAdd

public class ByteAdd extends Object
This shows something interesting about addition of "byte" variables (which also applies to all integer types).

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

		System.out.println("ByteAdd Program");
		// bytes are signed integer, so can range from -127 to +127
		byte b1 = 10, b2 = 127;	
		System.out.println("b1 + b2 = " + (b1+b2));
		b1 = 127;
		System.out.println("b1 + b2 = " + (b1+b2));