HELP! * GREY=local LOCAL HTML version of Foils prepared January 8,96

Foil 32 Java Language -- Classes

From Overview of Java SC95 Tutorial on Web Technologies -- December 4,95. by NPAC Team * See also color IMAGE

Class declaration in Java shares common aspects with C++ but there are also some syntactic and semantic differences.
Base syntax is simpler, cleaner and more intuitive. However, Java introduces some new modifiers, for example:
  • threadsafe -- to protect variables against asynchronous modification
  • synchronized -- to indicate that a method needs to acquire a lock before executing and to release the lock after completion
  • native -- to declare methods implemented in a platform -- dependent language, e.g. C.
  • final -- to mark entities that may be public but cannot be overloaded or overriden.
Only single inheritance is supported but aspects of multiple inheritance can be achieved in terms of the interface construct. Interface is similar to an abstract class with all methods being abstract and with all variables being static (global). Unlike classes, interfaces can be multiply-inherited.



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 Feb 18 1997