Java Glossary

Last updated 1998 July 9 by Roedy Green ©1996-1998 Canadian Mind Products.

Stuck in a frame? Click here to break out.

F

facade
See design patterns.
factory method
A factory is a sort of generic constructor that might produce any of a number of different kinds of objects. You have to implement it as a static method, rather than a constructor. Inside you can implement in several ways: See design patterns.
fallback
If two clever modems have trouble communicating because of static, they can run more slowly, or avoid using certain parts of the frequency spectrum. Dropping in speed is called fallback, and restoring to higher speed with line conditions improve is called fall forward.
FAQ
Frequently Asked Question.
fields
either class or instance member variables. non-local variables. Field also includes static final constants. See class variable, instance variable, local variable, variable.
File
The java.io.File class has many uses: File also handles directories. You can use it to delete, rename and test directories.
FileIO Amanuensis
a program that can be run either as an applet or as an application to generate Java source code for various I/O coding tasks. You can run or download it.
final
Final means, this value won't be changed hereafter. The word "final" is used in a number of contexts. Static final variables are close to constants in other languages. Final classes may not be subclassed. Final methods may not be overridden. Private implies final. Marking things final has two purposes: efficiency and safety. The compiler can perform various optimisations knowing the value cannot change. The compiler can also check to ensure you do not inadvertently attempt to change the value after computing its value once where it is defined.
fire
When a component wants to inform a set of listeners that a property has changed it will use fireVetoableChange to see if interested listeners will agree to the change. Then it uses firePropertyChange to inform interested listeners that the property has changed value. See trigger.
firewall
A computer that examines traffic coming and going to the internet, and dynamically filters out messages from certain IP addresses. It can prevent people inside from hooking up to various outside computers and vice versa. See proxy server.
fixation
when a neural net gets stuck in a local optimum well, and cannot progress Fto a better local optimum without backing out of the well. The net furiously "punishes" itself to no avail. Analogous to a bee trying to get out of a bottle. See snarl, addiction.
FlashPix
FlashPix is a non-proprietary, interoperable image file format for digital photographs developed by Eastman Kodak, Microsoft, Hewlett Packard, and Live Picture. The format is now being managed by the Digital Imaging Group. Kodak also maintains a FAQ (Kodak-centric of course) for Flashpix at: http://www.kodak.com/go/FlashPix.
Floating Point
Every person encountering floating point arithmetic is surprised. By floating point, I mean operations on the float and double types. There are four main points for novices to grasp:
  1. The computer floating point unit works internally in base 2, binary. The decimal fraction 0.1 cannot be precisely represented in binary. It is like the repeater fraction 0.33333 in base 10. When you add 0.333333 to 0.666666 why are you not surprised to get 0.999999 rather than 1.0, even though you just added 1/3 + 2/3. Yet, with Java floating point you are surprised when you add 0.1 + 0.1 and get something other than 0.2. The same fundamental mathematical cause is at work.
  2. Floating point is by its nature inexact. It is probably best if you imagined that after every floating point operation, a little demon came in and added or subtracted a tiny number to fuzz the low order bits of your result. Unless you really know what you are doing, you must presume the results are never precisely bang on. Don't count on results that in theory should be integers coming out precisely as integers. Never compare == or !=, check within a tolerance. Keep in mind when you compare > >= < <= the values you are comparing may, as a side effect of calculation, have drifted just above or just below your test limits. Sometimes you may want to include some slop/tolerance in your limits.
  3. You can do testing for floating point equality like this:
    if (Math.abs(value - target) < epsilon)
    or faster, but more verbose:
    if (value >= target-epsilon && value <= target+epsilon)
    when the order of magnitude of target is unknown, you might use some slower code like this:
    Presuming target is positive:
    if (Math.abs(value-target) < epsilon*target)
    or
    if (value >= target * (1-epsilon) && value <= target * (1+epsilon))
  4. When you want exact results, you must use ints, longs, or BigInts. Currency is best handled by storing pennies, and adding a decorative decimal point on display.
  5. All the rest of the world says y=sin(x);. Java insists that you say y=Math.sin(x);
  6. The Sun floating point display routines want to preserve even the low order fuzz so that if the number were converted back from ASCII to binary, you would get back exactly where you started. You can try Math.Round, write your own display routines, or go looking in the source code collections for some that give you control of how much precision you want displayed.
See Random Numbers, binary format, IEEE 754.
FlowLayout
layout manager that arranges subcomponents in rows. See Layout
Flyweight
See design patterns.
focus
the most recently clicked window or component has the focus of the user's attention. When a button in a frame has focus, the frame also has focus. Keystrokes are directed to the component with the focus.
followup
To post an electronic message commenting on some other message in an Internet Usenet newsgroup.
font
A font is a triple e.g. SansSerif / Bold Italic / 11 point -- the combination of type Family, style and size encapsulated into a Font object. Use java.awt.Toolkit.getDefaultToolkit().getFontList() to discover the available fonts. They will include "Serif" (formerly known as TimesRoman), "SansSerif" (formerly known as Helvetica) or "Monospaced" (formerly known as Courier). The font names you feed to setFont must exactly match ones on that list. The ZapfDingbats font is deprecated in 1.1. See the file font.properties. Inside it are the definitions that map the virtual Java Unicode fonts onto the 8-bit native fonts. It may take several 8-bit fonts to cover different regions of the Unicode character set in a Java virtual font. This allows the magic ability to simulate 16-bit Unicode fonts that can display more than 256 different characters when you only have 8-bit native fonts available. You can't use a native font in Java unless it has entries in the font.properties file to hook it up to some Java virtual font name.
new Font("Monospaced", Font.PLAIN, 12)
is a very time consuming operation. Save your Font objects and reuse them rather than creating new ones. Here are some resources if you want to attempt mult-lingual fonts. See Raymond Chung's essay on how to add new fonts to Java. See FontSaver.
FontSaver
Free source code to ensure Font and font peer objects are shared rather than duplicated.
foreign key
In SQL, a column in a table that matches the primary key column in some other table. Declaring a foreign key requires there to already be a matching record (one to one or many to one) in the other table, and constrains the field never to be null.
format
Java has no built-in methods of formatting numbers for display other than the primitive toString methods. Unfortunately, toString for doubles only displays about 6 significant digits. You have to roll your own perhaps starting with the Custom Innovation Solutions routines. See printf.
fractal compression
A patented technique for strongly compressing images. The interesting thing is they can be blown back up to any size. The technique generates artificial realistic detail. Patents and secrecy about how the method works has slowed its acceptance replacing JPEG. See wavelet compression.
frame
A Window with controls on it such as optional resizing buttons, an icon, a menubar and a title. See panel.

The term has a different meaning in datacommunications. Data are usually transmitted in bursts. Each burst is called a frame. It usually has some additional information such as the frame number, the size of the block, the error-checking code and markers for the start and end.

FreezeDry
A technique of shrinking Java code to 1/4 its size for shoehorning it into RAM in handheld devices.
friend
The closest thing Java has to the C++ concept of friend is the default package scope. See package scope.
FTP
File Transfer Protocol. A protocol built on top of TCP/IP that lets you send or receive a file over the Internet. The url for a file has this form: ftp://username:password@hostname/pathname. FTP works better than HTTP because it can pick up where it left off if the connection is broken. HTTP in theory has this feature as well, but it is more frequently implemented in FTP.
FUD
Acronynm for fear, uncertainty and doubt. A marketing tactic to freeze the buyer from making a decision by leaving an impression that a better product might be available imminently.
fullCity! Grid
a widget for displaying a grid of cells.
function
"functions" in C, C++ and Pascal are called "methods" in Java in honour of Smalltalk. All Java functions live inside some class. You can plot an arbitray f(x) function on the screen with the Berthou applet.



HTML Checked! award
Canadian Mind Products The Mining Company's
Focus on Java
Best of the Net Award
You can get an updated copy of this page from http://mindprod.com/jglossf.html