Java Glossary

Last updated by Roedy Green ©1996-1999 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.
FAX
FAX is an ancient technique for exchanging black and white bit images between computers. It has poor resolution and no error correction. However, it is compatible with thousands of FAX machines over the planet. FAXSAV is a way of using the Internet, rather than long distance phone lines, to do the bulk of the delivery, expecially for broadcasting. FAX is an ugly technology that refuses to die. Unfortunately, the competition, EMAIL enclosure, which allows arbitrary resolution, compression, colour, sending of very compact, editable word processing documents etc. is stuck in the stone age and refuses to evolve either.
February
The second month of the Gregorian calendar. Note the r. Most North American speakers, even professional announcers, are under the delusion it is silent. It makes them sound like children when the drop it. In java.util.Date and java.util.GregorianCalendar February is month 1 and January is month 0.
FESI
the Free ECMA Script Interpreter (i.e. standalone Javascript). An platform-independent external scripting language written in Java.
fields
either class or instance member variables. non-local variables. Field also includes static final constants. See class variable, instance variable, local variable, variable.
Fiji
A Gnu Public Licence Forth-like language that uses the JVM.
File
The java.io.File class has many uses: Every platform uses a different file format. Your Java apps will deal directly with those filenames. You have only three tools to help you: You are safest to build up filenames programmatically like this:
Win9x/NT Linux Apple Mac Groupe Bull GCOS 8
(JDK 1.1.6 beta)
lineSeparator "\r\n" "\n" "\r" "\n"
separatorChar '\\' '/' ':' '/'
pathSeparatorChar ';' ':' N/A ':'
absolute "C:\\myDir\\myFile.txt" "/usr/local/my.Dir/my.File.txt" "::myVolume:myDir:file.txt" "gcosuser/catalog/file.txt"
relative "myDir\\myFile.txt" "my.Dir/my.File.txt" "myDir:file.txt" "/catalog/file.txt"
(subordinate to the current GCOS 8 userid)
root "C:\\." "/." "::myVolume:" N/A
parent "..\\." "../." File.getParent() N/A
case sensitive no yes no no
charset A-Z a-z 0-9 accented - _ ~ ! @ # $ A-Z a-z 0-9 accented - _ ~ ! @ # $ Almost anything, Full Unicode, even control chars a-z 0-9 - _ .
avoid . : ; * @ % ^ & ( ) [ ] { } " ' < > ? + = / | : ; * @ % ^ & ( ) [ ] { } " ' < > ? + = / | : (. at beginning) ; * @ % ^ ( ) " ' < > ? + = / | : ; * @ % ^ & ( ) [ ] { } " ' < > ? + = / | ~ ! @ # $ accented
zip and jar files These files types are treated as a "container database" for a collection of Java class files and other resources. The pathnames stored within these files are not case sensitive and can be arbitrarily long.

GCOS 8 supports read-access to these files.

restrictions
  1. Each directory or file component must be less than or equal to 12 characters.
  2. Both "." and ".." can be valid file names.
  3. The construct "." does not refer to the current directory.
  4. The construct ".." does not refer to the parent directory.
GCOS is a mainframe JVM implementation without GUI. It runs on mainframes that use 36 bit words with non-IEEE floating point hardware. It has its roots in GE's GECOS, was later taken over by Honeywell, and had been run by the French Company, Groupe Bull since 1989. It is included mainly to show you just how different a platform can be and still run Java apps unmodified.
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 to 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.
flicker
If your painting flickers, you need to create bit map Images off screen then rapidly blast them onscreen in succession with Graphics.drawImage. Because images are platform dependent, you can't simply instantiate them with a constructor. You have to create them through calls like Applet.getImage(), Component.createImage(), or Toolkit.getDefaultToolkit().getImage(). See Peter van der Linden's Java Programmers' FAQ (Question 30, section 10).
Floating Point
Every person encountering floating point arithmetic is surprised. By floating point, I mean operations on the float and double types. There are five 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. It is God's fault for not making decimal 0.1 a perfect fraction in binary notation. Mike Cowlishaw, the creator of NetRexx, blames computer hardware makers for using binary floating point. He figures computer chips should use decimal notation like humans.
  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. How can you bypass this fundamental inaccuracy?
    • Do everything with float, but whenever you do a compare, realise there will be some slop in the answer. So instead of asking
      if (f == 100.00)
      say
      if (f > 99.995).
    • 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))
    • Use a mixture of ints and floats. Use the ints for your loop counting.
    • Instead of incrementing a floating point variable, recreate it from an int loop variable. e.g. instead of:
      f = f + 0.001;
      code
      f = i * 0.001;
    • Use double instead of float. This helps but does not totally solve the problem. All integers less than 2^53 (roughly 16 digits) can be exactly representable in double. This does not mean that results of a calculation that theoretically should be an integer (e.g. a square root of a perfect square) will actually be one. You still have fuzz to deal with.
    • 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.
  4. All the rest of the world says y=sin(x);. Java insists that you say y=Math.sin(x);
  5. 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. 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 multi-lingual fonts. See Sun's essay on how to add new fonts to JDK 1.2. See FontSaver. I have only got Unicode fonts to display properly with NT and Internet Explorer. Everything else displays accented letters above 255 without the accents.
FontSaver
Free source code to ensure Font and font peer objects are shared rather than duplicated.
for loop
For loops can have a dual index, like this: or like this: or like this: But, due to a hopelessly muddled for syntax dating back to C, (deriving from the attempt to reuse comma and semicolon in incompatible ways) you cannot write code like this: For loops allow two kinds of controlled goto, the break and the continue. Break leaps out of the loop entirely. Continue jumps to the end of the loop and continues looping. By labelling your for loops with words like inner: and outer: you can break out of two or more levels of nesting with break outer; or continue outer;. Break and continue work with while, do while and switch statements as well.
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 1.1 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 broken_linkCustom Innovation Solutions routines. Java 1.2 has a ton of them, but they are quite complicated to use since they are fully internationalised. 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.

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.

In HTML it refers to the independently scrollable panels on your browser screen. See HTML, panel.

FreeBuilder
a free Java IDE.
frequency
Pure colours are the colours of the rainbow. Higher frequency light in the rainbow spectrum of visible light has shorter wavelengths and more energy. Mixed colours like purple and brown don't appear on the rainbow. They can are created by mixing pure colours. Because of the way human vision works, it is possible to simulate the pure colours with mixtures of red, green, and blue light. The Wavelength package will let you create the pure rainbow colours (java.awt.Color objects) given their wavelength in nanometers or their frequency in teraHertz.
frequency spectrum
See HSB, Color, RGB, CYMK, wavelength.
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.
frob
As a verb, to tweak some adjustment in a computer program to fine tune it. As a noun, it refers to some parameter that you can adjust. You might for example frob the percentage of time your OS spends on background versus foreground tasks. Or you might tweak the Gaussian colour correction frob.
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/pub/mydir. 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. For a pure Java implementation of the FTP protocol see the Linlyn class. See IETF, SAX.
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 arbitrary f(x) function on the screen with the Berthou Applet.
function Keys
Here are the suggested function key assignments for Java to make do until we have globally configurable Java function key assignments:
KeyPlain KeyAlt-KeyCtrl-Key
F1Help
F2SaveOpen
F3Search forward againCancel
F4Search back againClose
F5Start SearchStart Replace
F6CutSpell Check (or more generally validate)
F7CopyInclude
F8PasteExclude
F9SortPrint
F10UndoRedo
F11RenamePurge
F12TidyCalculate
+ on keypadmagnify (more detail)
- on keypadshrink (less detail)



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