A Glossary for the Java Language
More on Java
[ java.html ]
[ java.syntax.html ]
[ java.semantics.html ]
[ java.packages.html ]
[ java..class.tree..html ]
Roedy Green's Java Glossary for Novices:
[ gloss.htm ]
These are working notes and are being revised daily. I am
open to corrections and improvements.
[ ../mailme.html ]
Two question marks ?? indicate that I haven't found the data yet.
If you have found the answer in any official documentation please
use the [Contact] button to tell me and your contribution
will be incorporated with an acknowledgment.
- Overloading::=One name for several different types of object or function.
- Interfaces::=describes what you can do with the set of classes that implements the interfases. An interface is a list of functions that the classes must provide.
- Package::=unrelated collection of classes and interfaces. A file that starts with a package specifier P generates classes C in directory P with a file C.class that can be imported as P.* or P.C.
- default_modifier::=In the absence of any modifiers fields are associated with objects and are visible to all classes in a package, and accessible by a subclass in the same package only.
- public::modifier=A public variable or function can be accessed in any other class.
- private::=modifierA private variable or function can only be accessed its own class.
- protected::modifier=A degree of hiding lie between public and private, subclasses and classes in the same package have access to these items. -- unwise since any class can claim to be a member of the same package!
Note for C++ programming, the C++ protected is the Java 1.0 private_protected.
(Thanks to Andrew who correct this July 2007)
- private_protected::=`A private protected field or function can be accessed by any subclass, but can not be used otherwise', -- in Java 1.0 only, and equivalent to the C++ protected.
This is deprecated by 1.5.
- static::=A variable or functions associated with a class rather than with the objects of the class.
Note for C programmers. In C a static variable declared in a functions
is the same variable each time you call it. This is not available in Java.
In C a static variable declared outside a function is shared by the set of functions in the same file and following the declaration an hidden from other functions. In Java a static variable is shared by all functions in that class. Whether other classes can access it depend on whether it is private, public, and/or protected. A Java variable that is nonstatic is something that is not found
in C. Each object in the class has its own variable, and all functions refer
to that particular variable. The variable is created as part of the object and
deleted with it.
In Java instance variables are the same each time you call them.
A variable or function is declared to be static when it associated
with the class of objects rather than a particular object in that
class. This means that a static function can not refer any data
in an object - because it has no object. It also means that static
data is essentially shared in common by every object but only stored
in a single place. If you are in doubt about whether some data should
be static or not - ask yourself how many times it occurs: once per
class(static) or once per object(not static) or many time per object
(its in a different class!).
- final::=once initialized it can not be changed.
A variable(a field of a class or object) is declared final when you want
it to keep its initial value for ever. It makes it a constant variable. A
class is declared as final if it can not be extended.
- native::=Preprogrammed in another language and running as machine code.
For a tutorial on a way to integrate C functions into Java methods see
[ index.html ]
- synchronized::=Only one thread can execute this at a time.
A method or block of code is marked as synchronized if only
one thread of control can be in it at a time. Other threads
are locked out. The code is reentrant. It protects resources from
interference by multiple access at one time.
- abstract::method=A method that must exist for objects in a class but is fully defined only in subclasses,
- abstract::class=A class with one or more abstract methods.
- abstract::=not concrete, not yet implemented, deferred, prototypical.
An abstract method is one that is defined in classes derived from
this class. All subclasses have a version as defined in the
base class or also declare it as abstract.
Certain methods can not be abstract: constructors, static, private, final, native, synchronized, plus those
that override superclass methods.
An abstract method makes the whole class abstract. A class
that inherits an abstract method and does not override it is
also an abstract class. An abstract
class can not be used to construct new objects. You can
only call an abstract method via an object in a class that
has extended the abstract class and defined all the abstract methods.
- threadsafe::= If another thread excuting this code at the same time can not change the value of a variable then the variable is threadsafe and the compiler may do clever things with it to make the code faster or smaller..
- transient::=something that does last longer than a function call.
If an object can exist longer than a given applet....is persistent....
then its transient data does not have to be preserved when a function
- applet::=A small program that can be sent across a network and interpreted safely on the receiving machine.
- awt::=Abstract windowing toolkit, another windowing toolkit. A set of machine independent classes that make it easier to create graphic user interfaces and output.
[ byte_code] .
- byte_code::=a way of describing classes as a stream of byte oriented machine code for the Java Virtual Machine.
- file::=A collection of data. A Java source code file defines one or more classes, interfaces to be added to a package.
[ class ]
[ interface ]
[ Package ]
- class::=Defines a collection of knowledge and know how. Classes are defined as declaring variables(fields) and functions(methods) associated with the objects of that class, and also with the class itself..
[ function ]
[ method ]
[ object ]
[ variable ]
- field::=A component or member of a class that holds data about and object or about the class, a variable.
- function::computing=A named piece of code that returns a value and may also do something
- function::java=A piece of know-how attached to a class or accessed via an object
- implements::=a class can claim to implement an interface if it provides definitions for all the functions listed in the interface. A class can implement many
interfaces and also extend one other class.
- interface::=Describes a set of classes in terms of what they can do for you, but allows each class to implement these methods in any way that you wish.
- JDK::=Java Development Kit: the compiler: javac, interpreter: java, and the classes.
[ javac ]
[ java ]
, Later called an SDK.
- method::=A piece of "know-how". A procedure or function that is associated with an object or to a class.
- object::=An instance of a class.
[ class ]
- procedure::ComputerScience=`A named piece of code that does something for a caller'.
- procedure::java=a void function.
[ function ]
- static::=something associated with a class rather than an object.
[ class ]
[ object ]
- variable::Java=A piece of data(knowledge) associated with a class or an object.
- virtual_machine::=A hypothetical machine that can be emulated on many different actual machines.
- void::=word used in place of a type to indicate that a function does not return a value.
-- introduced in ANSI C and still confusing people 10 years later.
- womb::=Java applets are kept alive inside a running program on the hosts machine - this called the womb. It also stops the applet from doing things that might be insecure.
- null::Object=nonexistent object.
. . . . . . . . . ( end of section A Glossary for the Java Language) <<Contents | End>>