FileDocCategorySizeDatePackage
ShortsVsInts.javaAPI DocExample298Mon Oct 30 12:56:46 GMT 2000None

ShortsVsInts

public class ShortsVsInts extends Object

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

		short i,j;
		i = 30;
		j = ++i;	// works
		j += 1;		// works
		j += 32768;	// compiles; truncates at run time!
		System.out.println(j);
		System.out.println(Short.MAX_VALUE);
		//j = j + 1;	// won't compile