Monday, September 19, 2005

volatile feilds

The volatile keyword tells the compiler to make sure that all threads use the same copy of the variable. If there is no volatile then each thread will use their own copy of the same variable. The reason threads may make their own copies of variables is due to optimization.


Java - Platform Independent Language.

"Platform independant" means that you compile it once, and that same executable file can be run on any system (that has a JRE).

It does NOT mean that you write the code, and then compile it on 27 different machines to make 27 different binaries that each can only be run on a specific machine, even if they're all built from the same source code file.


0 Comments:

Post a Comment

<< Home