Basic HTML version of Foils prepared July 6 99

Foil 24 Java Language Basics

From Use of Java Language in Computational Science DoD Modernization Users Group Conference Monterey -- June 7 99. by Nancy McCracken, Geoffrey C. Fox


Java syntax has many similarities to C and C++.
Some differences
  • No malloc or free - it has automatic garbage collection.
  • No pointers - designers felt pointer arithmetic not robust or safe.
  • Can declare variables almost anywhere as needed.
  • No struct, union, enum, typedef from C- it has classes and objects instead.
  • Primitive types for integers and floats have machine independent semantics
    • IEEE standard definitions - same answer on all machines.
Some similarities
  • All variables must be declared
  • Syntax and comments
  • Control structures: if, while, and for statements, expressions



© 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 Tue Jul 6 1999