Basic HTML version of Foils prepared Sept 6 1998

Foil 7 Primitive Types

From Java Tutorial 98-2: Java Language and Object Oriented Techniques CPS606 Fall Semester 1999 -- Sept 7 1999. by Geoffrey C. Fox, Nancy McCracken

An example application summing numbers.
1 There are 4 integer types: byte, short, int, long of size 8, 16, 32 and 64 bits, respectively.
2 float is 32 bits, double is 64 bits. Floating point arithmetic and data formats are defined by IEEE754 standard.
3 characters are given by 16bit Unicode charset and represented as short integers.
4 One can use casts for conversion such as
  • long l;
  • l = (long) i;
  • // which can be explicit as here and sometimes implied (see later)
5 Note booleans are either TRUE or FALSE -- they are not 0, 1 ,-1 ...

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Sep 6 1999