Basic HTML version of Foils prepared 9 Sept 1997

Foil 24 Java Language -- Types of Classes - II

From Java to be used in (Scientific) Computing Part II: Java Language and Object-Oriented Concepts Basic Simulation Track for Computational Science CPS615 -- Fall Semester 97. by Nancy J. McCracken,Geoffrey C. Fox


1 threadsafe: Instance or static variables will never change asynchronously and so can use compiler optimizations such as assigning to registers. Next modifier -- final -- is also valuable to compilers
2 final -- Cannot have a subclass for classes
  • cannot be overridden for methods
  • final variables have a constant value e.g.
    • final int ageatdeath = 101;
3 transient -- specifies that objects are not persistent
4 Note most of these modifiers can be used either for a class or an object -- a particular instance of a class
  • abstract only makes sense for a class and transient is perhaps more useful on an object basis

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 Sun Feb 22 1998