S

     
scope

A member's scope dictates its visibility. An automatic (local) variable is one defined inside a method body; its scope is the method itself, and it is not visible to code outside the defining method.



shift operator

The shift operators move the bits of an integer number to the right or the left, which results in another number.



short

A Java keyword used to declare a 16-bit signed primitive integer type in the range of -215 to 215-1 (or -32,768 to 32,767).



signature

A method's name and the type and order of its parameter list.



stack

The place where Java stores references to objects. The object data itself is stored on the heap. The stack is set to an initial fixed size , whereas the heap can grow to consume all available system memory. When a JVM thread is created (when a program starts), a separate, private stack is created for that thread. The stack stores frames , which contain the data.



stack trace

A list of called methods , in descending order in which they were called. The list represents the threads and monitors in the Java Virtual Machine, typically that led to an exceptional state. If the JVM experiences an internal error (say, because an exception is thrown), it will signal itself to print out the stack trace. Useful in debugging, the method call on the top of the stack trace should be the last method called when the program encountered an error.



static

A Java keyword used to define a variable, method, or standalone block of code as being executable without an instance of the class. Because static variables are called on a class, there is only one copy of a static variable, regardless of how many instances of the class there may be. Static methods may only operate on static variables . Notice that you can just write inside a class static{...} , which declares a block of code (not a method) that executes when the class loads (it would be polite of us to notice too that this technique is sometimes frowned upon, as it is obdurately defies object orientation). It is useful in invoking libraries used by native method calls.



static method

A method called directly on a class, not an instance of the class. Static methods do not have knowledge of instance variables. For example, the following statement is a static method declaration: public static void main(String[] args) . It makes sense that the famous main method would be static ”how could you start your application if you had to make an instance of some object first in order to call the main method? You would be making objects, in which case you would have already started your application. The following example shows using a class name to call one of its static methods without an instance of it: System.exit(0); . Methods declared in an interface may not be declared static.



static variable

A variable available directly from the class itself, not an instance of the class. Also known as class variables, static variables will have the same value across every instance of the class.



stream

Data read in or written out as a sequence of bytes or characters .



String literal

A sequence of characters contained within double quotes.



subclass

A class that extends another class, either directly (by using the keyword extends in its class declaration) or indirectly. All Java classes are subclasses of java.lang.Object. Sometimes subclasses are called child classes.



super

Java keyword used to call the constructor with the matching parameter list of a parent class.



superclass

A class from which another class is derived. Also called the parent class. java.lang.Object is the superclass of all Java classes.



Swing

A set of lightweight GUI components that run uniformly on any platform that supports the Java Virtual Machine.



switch

Java keyword used to evaluate a variable of integral primitive type (either an int or a type that can be implicitly cast to an int , such as byte , char , short , or int ) in order to match its value against values declared in case statements. If the switch value does not match any case , a default statement is executed, if implemented.



synchronized

Java keyword indicating that the method or code block that it contains is guaranteed to be executed by at most one thread at a time. Notice that you can write a perfectly legal (though useless as written here) block of code synchronized (new Object()){} , which demonstrates that you can synchronize access to an object without a method.





Java Garage
Java Garage
ISBN: 0321246233
EAN: 2147483647
Year: 2006
Pages: 228
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net