Java Glossary

Last updated by Roedy Green ©1996-1999 Canadian Mind Products.

Stuck in a frame? Click here to break out.

L

label
a component used to display decorative text on the screen to label some other component. Layout managers shift labels about just like other components. In contrast text refers to the text inside a component. End users don't typically modify labels. For data entry use textfields or text boxes. See textfield, text box. Note that you must not use repaint after a setText on a label.
Lambda expressions
Church's abstraction of function calls. They are not supported in Java.
language
a way of describing what you want the computer to do and hints how it can do it. Usually it is even more important that fellow humans understand your intent than the computer. The concept of language is being stretched in various new directions. A language is not necessarily a stream of words like English. It could be a flowchart, checkboxes, or some graphical representation that looks like plumbing. Java is just one of many computer languages. Java is being enriched by ideas from people whose background includes the following languages: Abundance, Ada, Algol 68, Alphard, APL, awk, Cecil, C, C++, CLU, COBOL, Delphi/Object Pascal, Dylan, Eiffel, Esperanto, Euler, Forth, FORTRAN 90, some Free compiler, GNUStep, Haskell, Java, Lisp, Logo, ML, Modula, Oberon, NeXT/Objective C, Occam, Perl, PL/I, Prolog, PostScript, Python, RPG, Sail, Sather, Scheme, Simula, Smalltalk, SML, Tcl (tickle), Tom, Visual Basic, or some other language. A great place to get a taste of many different languages is the collection of the source code to print the words to 99 Bottles Of Beer On the Wall.
Language Codes
ISO standard 639.1988 defines two-letter lower case abbreviation codes for each spoken language, e.g. "ar" = Arabic, "en" = English, "eo" = Esperanto. See Country Codes.
LAP-M
Link Access Procedure For Modems is a error-control protocol for modems defined in CCITT spec V.42. This is similar to MNP-4. A V.42 modem, if it cannot connect with V.42 will fall back to MNP-4. Since only the basic level 1 link layer is shared by MNP-4 and LAP-M, this renegotiation can take a fair bit of time.
Last Modified Date
The Java spec says you cannot trust the value of File.getLastModifiedDate to have any particular representation. It turns out it can be trusted after all, though this is still not official. Even on Win95 it returns the number of milliseconds since 1970 Jan 01, 00:00 GMT. See BigDate to see how you might convert these to dates and times.
Latte
Inprise's (Borland's) code name for JBuilder while it was in development. See JBuilder.
Lava
Lava is a set of Java classes for emulating standard C library functions, including printf, text and number formatting classes, data encryption classes, including support for DES (Data Encryption Standard), text stream parsing classes and text console dialog classes.
Layout
a method that fine tunes the sizes and positions of a group of graphical elements from a few rough hints on how you want the layout done. You can roll your own layout manager, or use one of the standard ones. Have a look at Sun's tutorial on layout managers. Beware, Sun's tutorial talks in terms of JDK 1.0.2. Peter Haggar has written a most excellent tutorial. Here is my general understanding of Layouts. Each component has four sizes (height,width). A layout manager basically does a setBounds(x,y,width,height) on each component in a container, which sets the component's actual size and location. The routine that actually assigns co-ordinates and sizes to each component is called: However the container as a whole also needs a getMinimumSize(), getMaximumSize() and getPreferredSize() method too, since it acts a component in an enclosing container. So the layout manager also needs to provide generic routines for computing the desired size of the container by totalling up the sizes of the contained components taking into consideration how they are packed in. These routines are indirectly used by another higher level layout manager. The routines that compute the sizes of an entire container are called: If you want to do absolute pixel positioning, without a layout manager, you must do setLayout(null). See CardLayout, FlowLayout, GridBagLayout, PackerLayout.
LDAP
Lightweight Directory Access Protocol. LDAP is a client-server protocol for accessing a directory service. It was initially used as a front-end to X.500, but can also be used with stand-alone and other kinds of directory servers. See the introductory roadmap and the FAQ or RFCs 1777 and 1778.
leap year
The earth takes 365.242190 days to orbit the sun, though this varies from 365.242196 in 1900 to 365.242184 in 2100. For the following calculations of error, we presume 1900 as the standard year. This is not an integral number of days, so we fiddle with the calendar adding leap years to keep the calendar in sync with the sun. There is a great deal of confusion about how you calculate the leap years.

Julius Caesar created the modern calendar in 46 BC. Prior to that it was a mess well beyond your wildest dreams. The Julian calendar is still used by the Russian Orthodox church and by programmers who are ignorant of the official Gregorian calendar. It has leap years every four years without exception. It corrects to 365.25. It gets ahead 1 day every 128 years.

public static final boolean isLeapViaJulian (int yyyy) {
 return yyyy % 4 == 0;
 }

Joseph Justus Scaliger (1540-1609) invented an Astronomical Julian calendar, (named after his father Julius Caesar Scaliger). This Julian calendar uses the offset in days since noon, Jan 1st 4713 BC. In that scheme, 2000 January 1 noon is the start of day number 2,451,545. This calendar follows the original Julian scheme of always adding leap years every four years.

The next major correction was the Gregorian calendar. By 1582, this excess of leap years had built up noticeably. At the suggestion of astronomers Luigi Lilio and Chistopher Clavius, Pope Gregory XIII dropped 10 days from the calendar. Thursday 1582 October 4 Julian was followed immediately by Friday 1582 October 15 Gregorian. He decreed that every 100 years, a leap year should be dropped except that every 400 years the leap year should be restored. Only Italy, Poland, Portugual and Spain went along with the new calendar immediately. One by one other countries adopted it in different years. Britain and its territories (including the USA and Canada) adopted it in 1752. By then, 11 days had to be dropped. 1752 September 2 was followed immediately by 1752 September 14. The Gregorian calendar is the most widely used scheme. This is the scheme endorsed by the US Naval observatory. It corrects the year to 365.2425. It gets ahead 1 day every 3289 years.

public static final boolean isLeapViaPopeGregory (int yyyy) {
 if ( yyyy < 1582 )      return yyyy % 4 == 0;
 if ( yyyy %    4 != 0 ) return false;
 if ( yyyy %  100 != 0 ) return true;
 if ( yyyy %  400 != 0 ) return false;
 return true;
}

Astronomer John Herschel (1792-1871) suggested dropping a leap year every 4000 years. This scheme never received official support. It corrects to 365.24225. It gets ahead 1 day every 18,519 years.

public static final boolean isLeapViaHerschel (int yyyy) {
 if ( yyyy < 1582 )      return yyyy % 4 == 0;
 if ( yyyy %    4 != 0 ) return false;
 if ( yyyy %  100 != 0 ) return true;
 if ( yyyy %  400 != 0 ) return false;
 if ( yyyy % 4000 != 0 ) return true;
 return false;
}

The Greek Orthodox church drops the 400 rule and in its place uses a rule that any year that when divided by 900 gives a remainder of either 200 or 600 is a leap year. This is the official system in Russia. It corrects to 365.24222. It gets ahead 1 day every 41,667 years.

public static final boolean isLeapViaGreek (int yyyy) {
 if ( yyyy < 1582 )      return yyyy % 4 == 0;
 if ( yyyy %    4 != 0 ) return false;
 if ( yyyy %  100 != 0 ) return true;
 int remdr = yyyy % 900;
 return remdr == 200 || remdr == 600;
}

The SPAWAR group in the US Navy propose the following algorithm where a leap year is dropped every 3200 years. This is most accurate of the schemes, and also has the desirable property of undercorrecting, leaving room for leap second correction. It corrects to 365.2421875. It gets behind 1 day every 117,647 years. Leap seconds are added on average every 3 out of 4 years to correct for the ever lengthening day. This means it is best to have a scheme with slightly too few leap days than too many, since the leap seconds can compensate also. Leaps second add up to roughly an extra day every 115,000 years. When you consider the effects of leap seconds, this scheme is bang on, within the limits of the varying length of an astronomical year.

public static final boolean isLeapViaSPAWAR (int yyyy) {
 if ( yyyy < 1582 )      return yyyy % 4 == 0;
 if ( yyyy %    4 != 0 ) return false;
 if ( yyyy %  100 != 0 ) return true;
 if ( yyyy %  400 != 0 ) return false;
 if ( yyyy % 3200 != 0 ) return true;
 return false;
}

I will leave as an exercise for the reader the staircase leap year algorithm that is the most accurate possible. If you get it, I will post it here with an attribution to you. Hints:

Perhaps some future earth citizens will drag the orbit of the earth slightly so no further adjustments will be necessary. More likely, sentient life will convert to a less terracentric calendar, perhaps time quanta since the big bang.

year Julian
Leap?
Gregorian
Leap?
Herschel
Leap?
Greek
Leap?
SPAWAR
Leap?
1 no no no no no
4 yes yes yes yes yes
1580 yes yes yes yes yes
1582 no no no no no
1584 yes yes yes yes yes
1600 yes yes yes no yes
1700 yes no no no no
1800 yes no no no no
1900 yes no no no no
1996 yes yes yes yes yes
1997 no no no no no
1999 no no no no no
2000 yes yes yes yes yes
2100 yes no no no no
2200 yes no no no no
2300 yes no no no no
2400 yes yes yes yes yes
2800 yes yes yes no yes
2900 yes no no yes no
3200 yes yes yes no no
3300 yes no no yes no
3600 yes yes yes no yes
3800 yes no no yes no
4000 yes yes no no yes
4200 yes no no yes no
4400 yes yes yes no yes
4700 yes no no yes no
4800 yes yes yes no yes
5100 yes no no yes no
5200 yes yes yes no yes
6400 yes yes yes no no
6500 yes no no yes no
6800 yes yes yes no yes
6900 yes no no yes no
7200 yes yes yes no yes
7400 yes no no yes no
7600 yes yes yes no yes
7800 yes no no yes no

LEDataInputStream
CMP's little-endian analog to DataInputStream that lets you read little-ending Intel format binary, least significant byte first. You can download the code and source free. See LEDataOutputStream, LERandomAccessFile, endian, I/O.
LEDataOutputStream
CMP's little-endian analog to DataOutputStream that lets you write little-ending Intel format binary, least significant byte first. You can download the code and source free. See LEDataInputStream, LERandomAccessFile endian, I/O.
LEDataRandomAccessFile
CMP's little-endian analog to RandomAccessile that lets you read/write little-ending Intel format binary, least significant byte first. You can download the code and source free. See LEDataInputStream, LEDataOutputStream, endian, I/O.
LEDataStream
CMP's little-endian analog to DataInputStream and DataOutputStream that let you read and write little-ending Intel format binary, least significant byte first. You can download the code and source free. See LEDataInputStream, LEDataOutputStream, LERandomAccessFile, endian, I/O.
left outer join
See join
leg pulling
A popular Canadian form of humour where you pretend to describe something seriously, and gradually get more ridiculous, seeing how long you can suck people in before they notice. If you are serious about describing a future technology, and you notice your audience is feeling threatened, it is fairly easy to relax them by quickly veering off into an obvious leg pull. This way you can let them get used to new ideas first in the context of humour.
Lemur
Lemur is an IDE for Java and is itself written in 100% Java. Here are some of Lemur's features: Lemur version 0.2 beta is now available for download online as a fully functioning time-limited self-extracting zip file for windows. A Linux version will be available shortly. Lemur's GUI components are built using the latest Swing-1.1beta3 release so you will need that software and a 1.1 level VM to run Lemur itself.
lightweights
You can create simple custom components by overriding a few methods of the official ones. These pure Java custom components are referred to as lightweights. They don't have an associated GUI peer object. Since all the code is in Java, these components behave identically on different platforms. In contrast heavyweight components behave according to native GUI rules. Lightweights do their own drawing, based on something low-level like a canvas or panel. This gives them precise control over how they look and behave. Heavyweights use the native drawing facilities. Lightweights behave the same on all platforms. Heavyweights behave according to the local customs. See Swing, JFC.
Limbo
AT&T/Lucent's new language that competes with Java. It uses digital signatures instead of run-time checking for security. See Inferno, Dis, Plan 9, Styx. See Dis, Inferno, Styx, Plan 9.
Link
In dbAnywhere, a link is an interface to bind GUI objects to the database. A link interface provides methods for the GUI object to report data changes to the database (notifySetData), and for the database to report changes to the GUI object (notifyDataChange). See ListLink, ProjLink, Binder, dbAnywhere.
LinkedList
LinkedList is Canadian Mind Products' replacement for Java Vector class. It is implemented as a classical doubly linked list. It is faster that Vector for insert/delete, but slower for indexed access. The interface is modeled on java.util.Vector, so you can try it both ways and pick which is faster for your needs. Heavily commented Java source is included. Download.
Links To Links
If you can't find it here, try searching these other Java related sites. From there you should be able to find everything on the net related to Java.
Lint
A program that checks source code for possible errors, things that are formally correct, but that look suspicious. There is currently no Lint program for Java. See my student project outline for how one might work.
Linux
Linux is a UNIX-like operating system. Blackdown has ported Java to it. I have written an essay that would be helpful for anyone installing Red Hat Linux for the first time, or who is new to Unix with a Windows 95 background.
list
list of choices from which you can select one. Like a choice displayed already opened up. In dbAnywhere, a List is group of columns in an SQL table. See LinkedList, choice, combo, dbAnywhere.
Listener
If an object is interested in hearing about events generated in some component, it may register itself as a Listener for that type of event. If your component uses an anonymous inner class that extends one of the eventListenerAdapter classes, it can register itself as a listener for any class of event. This won't interfere with subclasses doing the same thing. Everybody gets notified. event.consume() is the way a subclass can suppress a superclass seeing the event too.
ListLink
In dbAnywhere, a ListLinklink is an interface to bind GUI objects to a group of columns in the database. A ListLink interface provides methods for the GUI object to report data changes to the database (notifySetData), and for the database to report changes to the GUI object (notifyDataChange). For example, if you had a dbAware Grid object to display multiple columns, it would implement the ListLink interface. There would be a ListBinder object to glue it to the RelationView object. See LinkedList, ProjLink, Link, Binder, dbAnywhere.
literal
A literal is an explicit number or string constant used in Java programs. Here is a list of all the variant forms I have found Java to support:
ints 1 -1, hex ints 0x0f28, unicode hex '\u003f', octal 027, Integer.MAX_VALUE (2,147,483,647), Integer.MIN_VALUE (-2,147,483,648)
longs 3L, -99l, 0xf011223344L (Beware! some compilers will just chop the high bits from literals without the trailing L even when assigning to a long.), Long.MAX_VALUE (9,223,372,036,854,775,807), Long.MIN_VALUE (-9,223,372,036,854,775,808)
floats 1.0345F, 1.04E-12f, .0345f, 1.04e-13f, Float.NaN
doubles 5.6E-120D, 123.4d, 0.1, Double.NaN, Math.PI
Note floating point literals without the explicit trailing f, F, d or D are considered double. In theory you don't need a lead 0, e.g. 0.1d may be written .1d, though the Solaris and Symantec compilers seem to require it.
Beware! A lead 0 on an integer implies OCTAL. That was a major design blunder inherited from C, guaranteed to introduce puzzling bugs. Be especially careful when specifying months or days, where you naturally tend to provide a lead 0.
boolean true and false,
strings "ABC", enclosed in double quotes,
chars 'A', enclosed in single quotes,
or integer forms e.g. 45, 0x45, '\u003f'
Escape sequences inside char and string literals include:
'\u003f' unicode hex, (must be exactly 4 digits)
'\n' newline, ctrl-J (10, x0A)
'\b' backspace, ctrl-H (8, 0x08)
'\f' formfeed, ctrl-L (12, 0x0C)
'\r' carriage return, ctrl-M (13, 0x0D)
'\t' tab, ctrl-I (9, 0x09)
'\\' backslash,
'\'' single quote (optional inside " "),
'\"' double quote (optional inside ' '),
'\377' octal (must be exactly 3 digits. You can get away with fewer, but then you create an ambiguity if the character following the literal just happens to be in the range 0..7.)
\007 bel, ctrl-G (7, 0x07)
\010 backspace, ctrl-H (8, 0x08)
\013 vt vertical tab, ctrl-K (11, 0x0B)
\032 sub, eof, ctrl-Z (26, 0x1A)
There is no '\' style way of specifying decimal constants. Just use char c = 123;
The following C forms are not supported:
'\a' alert,
'\v' vertical tab,
'\?' question mark.
'\xf2' hex.
See constant, static, final, primitive, IEEE 754.
little-endian
See endian
LiveConnect
A feature of Netscape 3.0 that allows JavaScript-to-Java and Java-to-JavaScript communication. Because Java is a strongly typed language with a large number of data types and JavaScript is an untyped language with relatively few types, LiveConnect provides the necessary data conversions, or wrappers in the case of objects. Java uses the JSObject Class for all object conversions, and JavaScript uses a variety of JavaClass objects, JavaObject objects, JavaMethod objects, etc. Using LiveConnect, JavaScript programs can interact with Java applets, Java-enabled Navigator plug-ins, and built-in Java system classes on the browser. As well, applets and Java-enabled plug-ins can interact with JavaScript, invoking functions and reading and writing properties. Internet Explorer 3.0 does not support LiveConnect, dealing with Java applets instead as ActiveX objects. The ActiveX interface provides only some of the capabilities of LiveConnect.
local variable
a variable declared inside a method that lives only while that method is executing. A variable not a class variable nor an instance variable. Some Java compilers have a limit of only 31 local variables per method. Watch out.
locale
a geographic or political region that shares the same language and customs. Programs can be customised to a language, country and style. Locales have been given standard identifiers, e.g. Locale.CANADA_FRENCH, Locale.FRANCE, CANADA_US. These are not the same as country codes. See country codes.
localhost
"localhost" and "127.0.0.1" are the DNS (Domain Name Service and IP (Internet Protocol) names for the local machine. See DNS.
location
The x,y co-ordinates of the upper left corner of a component in the parent component's co-ordinate space.
logo
To put the Netscape logo on your web page, see their Netscape Now Program.
To put Opera's logo on your web page, you don't need any particular permission. You can get the logos from their website.
To put Microsoft's Internet Explorer logo on your web page, see their GetLogo Program.
Netscape Opera IE
Click to download the latest browser software.
loop, endless
See endless loop.
loopback
When you test modems, you can ask a remote modem to send back the same test message you send it. This is called remote loopback. To localize the problem, you might then ask the local modem to echo back to the computer the message sent to it, without sending it out to the remote modem. This is called local loopback.



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