HELP! * YELLOW=global GREY=local Global HTML version of Foils prepared 1 February 97

Foil 10 Java Language -- Types of Classes - II

From Jan 27 Delivered Lecture for Course CPS616 -- Java Lecture 2 -- Basic Applets and Objects CPS616 spring 1997 -- Jan 27 1997. by Nancy McCracken * See also color IMAGE
Secs 10
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
final -- Cannot have a subclass for classes
  • cannot be overridden for methods
  • final variables have a constant value e.g.
    • final int ageatdeath = 101;
transient -- specifies that objects are not persistent
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


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 16 1997