CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 22 Aug 2025 00:02:43 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20070304054515
location: https://web.archive.org/web/20070304054515/https://www.oreilly.com/catalog/expjava/inx.html
server-timing: captures_list;dur=0.461074, exclusion.robots;dur=0.015449, exclusion.robots.policy;dur=0.007141, esindex;dur=0.010939, cdx.remote;dur=16.524104, LoadShardBlock;dur=525.196813, PetaboxLoader3.datanode;dur=137.647718, PetaboxLoader3.resolve;dur=211.678991
x-app-server: wwwb-app210
x-ts: 302
x-tr: 574
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app210; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Fri, 22 Aug 2025 00:02:44 GMT
content-type: text/html
x-archive-orig-date: Sun, 04 Mar 2007 05:45:15 GMT
x-archive-orig-server: Apache
x-archive-orig-p3p: policyref="https://www.oreillynet.com/w3c/p3p.xml",CP="CAO DSP COR CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa CONo OUR DELa PUBi OTRa IND PHY ONL UNI PUR COM NAV INT DEM CNT STA PRE"
x-archive-orig-last-modified: Sun, 05 Nov 2006 07:11:17 GMT
x-archive-orig-etag: "6cc5ba-b4a7-454d8e95"
x-archive-orig-accept-ranges: bytes
x-archive-orig-content-length: 46247
x-archive-orig-connection: close
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: iso-8859-1
memento-datetime: Sun, 04 Mar 2007 05:45:15 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sat, 01 May 1999 02:11:31 GMT", ; rel="prev memento"; datetime="Thu, 13 Jul 2006 00:04:42 GMT", ; rel="memento"; datetime="Sun, 04 Mar 2007 05:45:15 GMT", ; rel="last memento"; datetime="Sun, 04 Mar 2007 05:45:15 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 38_0_20070304054111_crawl27-c/38_0_20070304054335_crawl22.arc.gz
server-timing: captures_list;dur=0.431493, exclusion.robots;dur=0.015404, exclusion.robots.policy;dur=0.007592, esindex;dur=0.008872, cdx.remote;dur=13.640570, LoadShardBlock;dur=135.099243, PetaboxLoader3.datanode;dur=263.790783, PetaboxLoader3.resolve;dur=222.068448, load_resource;dur=470.204335
x-app-server: wwwb-app210
x-ts: 200
x-tr: 667
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
oreilly.com -- Online Catalog: Exploring Java
Cover | Table of Contents | Index
Index
Symbols ! (logical complement) operator, 91 @ (at sign) in doc comments, 80 & (bitwise AND) operator, 91 & (boolean AND) operator, 91 & (dereference) operator in C, 92 && (conditional AND) operator, 91 &= (assignment) operator, 91 * for importing classes, 145 \ (backslash) in paths, 226 ! (not) operator, 61 != (inequality) operator, 91 | (bitwise OR) operator, 91 | (boolean OR) operator, 91 || (conditional OR) operator, 91 |= (assignment) operator, 91 [] (index) operator, 103 ^ (bitwise XOR) operator, 91 ^ (boolean XOR) operator, 91 ^= (assignment) operator, 91 , (comma) operator in C, 89, 92 {} curly braces, 52 for code blocks, 87 for creating arrays, 105 - (subtraction) operator, 91 - (unary minus) operator, 91 -- (decrement) operator, 91 -= (assignment) operator, 91 - (hyphen) in class names, 261 . (dot) notation, 93, 114 = (assignment) operator, 91 = (equality) operator, 91 == (identity) operator, 50, 299 > (greater than) operator, 91 >= (greater than or equal) operator, 91 >> (rightwise shift) operator, 91 >>= (assignment) operator, 91 >>> (rightwise shift) operator, 91 >>>= (assignment) operator, 91 < (less than) operator, 91 <= (less than or equal) operator, 91 << (leftwise shift) operator, 91, 363 <<= (assignment) operator, 91 () parentheses, 91 % (remainder) operator, 91 %= (assignment) operator, 91 + (addition) operator, 91 + (string concatenation) operator, 9, 86, 91, 186, 191 + (unary plus) operator, 91 += (assignment) operator, 91 ++ (increment) operator, 91 ?: (conditional ternary) operator, 91 / (slash) in paths, 226 / (division) operator, 91 /= (assignment) operator, 91 // // comments, 80 /* */ comments, 80 /** */ comments, 80-81 * (multiplication) operator, 91 * (reference) operator in C, 92 *= (assignment) operator, 91 ~ (bitwise complement) operator, 91 A ABORT (variable), 356 absolute positioning, 328 absolute value, 194 abstract (modifier), 126, 375 methods and classes, 50, 141 Abstract Windowing Toolkit (see AWT) abs(), 194 accept() with sockets, 237 access control (see encapsulation; visibility modifiers) account name, user, 208 acos(), 194 ACTION_EVENT, 295 action(), 50-51, 295 add(), 290 addConsumer(), 360, 369 addElement(), 201 addItem(), 304 addition (+) operator, 91 addNotify(), 283 add(), 49 after(), 199 align attribute (<applet> tag), 75 alignment, applet, 75 ALLBITS (variable), 356 allocating memory, 11 alpha (see ARGB color model) alt attribute (<applet> tag), 75 alternate text for browsers, 75 AND (&) operator, bitwise, 91 AND (&) operator, boolean, 91 AND (&&) operator, conditional, 91 answer(), 318 API (Application Programming Interface), 183, 375 append(), 191 Applet (class), 32 <applet> tags, 72-77, 294 align attribute, 75 alt attribute, 75 code attribute, 73, 75 codebase attribute, 76 height attribute, 73, 75 hspace attribute, 75 name attribute, 75 vspace attribute, 75 width attribute, 73, 75 AppletContext (object), 293, 295 applets, 22-23, 292-295, 375 alignment of, 75 alternate text for, 75 examples of simple, 27-63 files and, 232-233 name of, 73, 75 padding of, 75 propreties unreadable by, 208 size of, 73, 75 threading, 166-169 viewing, 77, 293-295, 376 AppletStub (object), 293 appletviewer program, 77 Application Programming Interface (API), 183, 375 application-level security, 19-21 applications, 24, 376 applets, 2 helper, 22 application/x-tar type, 262-267 arccosine, 194 archived class files, 68 arcsine, 194 arctangent, 194 ARGB color model, 361 arguments, 31 passing to methods, 122-123 arithmetic operators, 91 ArithmeticException, 193 arraycopy(), 106 ArrayIndexOutOfBoundsException, 106 arrays, 12, 52-54, 103-109, 157-158, 200 creating and initializing, 104 declaring, 52 multidimensional, 107 nonrectangular, 109 (see also vectors) ArrayStoreException, 158 ascent (for fonts), 340 asin(), 194 assignment, 92 assignment operators, 91 atan(), 194 attributes, HTML, 72 audio files, 373-374 AudioClip (object), 374 authentication, 21 @author tag, 81 available(), 216, 229 AWT (Abstract Windowing Toolkit), 279-329, 376 multiple, 285 B backslash (\) in paths, 226 in strings, 227 base classes, fragile, 11 base URL, 76, 253 baselines (for fonts), 340 before(), 199 binding methods, 10 dynamic, 136 bitwise operators, 91 block comments (see comments) BOLD(value), 337 boolean operators, 91 boolean (type), 39, 82, 376 BorderLayout (layout manager), 290, 301, 313, 324-327 braces {}, 52 for code blocks, 87 for creating arrays, 105 break statements, 90, 102 browsers, Web (see Web browsers) BufferedInputStream (class), 214, 219-220 BufferedOutputStream (class), 214, 219-220 building-block components, 295 Button (object), 43-54, 283 byte (type), 82, 376 ByteArrayOutputStream (class), 223 byte-code verification, 15-17, 66, 390 C C and C++, compared to Java, 6 callbacks, 151-152, 298, 376 canRead(), 228 Canvas (object), 287, 308-310 canWrite(), 228 capitalization, 117, 261 equals(), 188 toUpperCase(), toLowerCase(), 189 CardLayout (layout manager), 291, 321, 327-328 carriage returns (see whitespace) case expressions, 89 case sensitivity (see capitalization) casting, 138-139, 376 catch clauses, 61-62, 90, 97, 101, 376, 379, 389 (see also errors and exceptions) ceil(), 194 char (type), 80, 82, 84, 376 character literals, 84, 189 getting from strings, 187 within strings, returning, 189 (see also StringBuffer; strings) charAt(), 187 charWidth(), 340 checkAccept(), 210 checkAccess(), 210, 247 checkboxes, 305-308 CheckboxGroup (object), 305 checkConnect(), 210 checkDelete(), 210 checkError(), 220 checkExec(), 210 checkExit(), 210 checkListen(), 210 checkPropertyAccess(), 210 checkRead(), 210, 247 -checksource option (java), 66 checkTopLevelWindow(), 210 checkWrite(), 210 Choice (object), 302 .class extension, 69 class files alternative base URL, 76 archived, 68 loading, 75 modification times, 71 class instances, 30, 112 class loaders, 17, 377 class methods, 115-117, 377 Class (object), 155-156 class paths, 66, 68-69, 377 default, 69 class type variables (see references) class variables, 115-117, 377 ClassCastException, 138, 200, 256 classes, 4, 13, 29, 112-117, 376 abstract, 141 array (see arrays) collection, 200-206 compilation units, 143, 377 declaring, 381 error, 95 final, 189 importing, 38, 144, 381 incremental development, 11 inheritance, 32 MIME types and, 261 multiple constructors (see overloading methods) packages of (see packages) protocols into names for, 268 public, javac compiler and, 70 reference types, 84-86 visibility of, 144 wrapper, 82 -classpath option (java, javac), 66 CLASSPATH (variable), 68, 381 clients, 237-241, 377 clipRate(), 346-349 clipRect(), 286, 333 clock applet, 167 close(), 217, 229 code attribute (<applet> tag), 73, 75 code, source blocks, 87, 128-129 compilation units, 143 codebase attribute (<applet> tag), 76 collection classes, 200-206 Color (class), 51 colors, 51-54, 336 color models, 361, 366 encoding as image data, 361-362 predefined, 52 separating, 372 comma (,) operator in C, 89, 92 comments, 80-81 compareTo(), 188 comparing dates, 199 strings, 187 compilation units, 143, 377 compiler, Java (see javac) compilers, 377 COMPLETESCANLINES property, 365 Component (class), 33, 47 components, GUI, 281-287, 295-300, 322, 377 absolute positioning, 328 checkboxes, 305-308 creating new, 314-316 dialogs, 316-320 file-selection boxes, 318-320 functional vs. building-block, 295 menus, 302-305 queries, 316 scrollbars, 310-314 size of, 322 "smart", 296 text, 300-302 updating, 286-287 (see also layout managers) composition, 31, 378 concatenation (+) operator, 9, 86, 91, 186, 191 concurrency (see threads, synchronization) conditional AND (&&) operator, 91 OR (||) operator, 91 statements, 88 ternary (?:) operator, 91 connected (variable), 275 connection-oriented protocol, 237 connect(), 221 constant colors, 336 constants, 117 PI and E, 195 constructors, 46, 93, 125-126, 139-141, 378 default, 47 File, 226 overloaded, 127-128 string, 185-186 consumer threads, 174-178 Container (class), 33, 48 containers, 290-291, 295-300, 378 invalid, 291 preferred size of, 322 "smart", 297-299 contains(), 201 containsKey(), 204 content handlers, 24, 257-267, 378 ContentHandler (class), 264 ContentHandlerFactory (object), 266 continue statements, 90, 102 conversion double to integer, 194 MIME types to package/class names, 261 protocols into package/class names, 268 rectangular and polar coordinates, 194 strings into integers, 218 to and from strings, 186-187 coordinates rectangular and polar, 194 system of, 333 cos(), 194 cosine, 194 countTokens(), 192 createButton(), 283 crypt, 270-278 cryptography, 20 -cs option (java), 66 curly braces (see braces) currentTimeMillis(), 199 D -d option (javac), 70 dash (-), 261 data buffers, 219-220 hiding (see encapsulation) streams, 213-225 types (see types) datagram sockets, 248-253 datagrams, 378 DataInputStream (class), 213, 217-219 DataOutputStream (class), 213, 217-219 DateAtHost client, 241-243 dates and times, 198-200, 241-243 deallocating memory, 11 debugging, 9 decimal integers, 83 declaring arrays, 52 classes, 381 local variables, 121 methods, 113 variables, 31, 83, 87, 113 decrement (--) operator, 91 default array values, 104 case expression, 89 class path, 69 constructors, 47, 126 coordinate system, 333 property values, 207 values for instance variables, 39 variable values, 83 #define statements, 9 delete(), 228 dereference (&) operator in C, 92 descent (for fonts), 340 destroying objects, 129-130 destroy(), 169, 293 dialogs, 316-320 Dictionary class, 206 digital signatures, 20 direct color models, 361 directories creating, 228 getting information about, 227 listing files of, 228 renaming, 228 dispose(), 305, 350 division (/) operator, 91 doc comments, 80-81 dot (.) notation, 93, 114 double buffering, 349-351 double (type), 82, 84, 378 converting to integer, 194 doubleValue(), 196 do-while statements, 88 downloading images, 314 draw3DRect(), 336 drawArc(), 336 drawImage(), 314, 342-343 drawing (see images) drawLine(), 336 drawOval(), 336 drawPolygon(), 336 drawRect(), 336 drawRoundRect(), 336 drawString(), 36, 337, 340 dynamic binding, 136 E E (value), 195 editing strings, 189 Editor (object), 318-320 elementAt(), 202 elements(), 202, 204 embeddable applications (see applets) encapsulation, 14-18, 145-148, 378 encoding color image data, 361-362 ISO10646, 382 ISO8859-1, 382 text, 79-80 UTF-8, 390 Encryption (class), 270 endsWith(), 188 Enumeration interface, 192, 202-203 environment information, 208 CLASSPATH, 68 EOFException, 232 equality (=) operator, 91 equals(), 51, 153-154, 188, 199 equalsIgnoreCase(), 188 err (see System.err) ERROR (variable), 356 errors and exceptions, 12, 61-62, 90, 94-103, 379, 389 ArithmeticException, 193 ArrayIndexOutOfBoundsException, 106 ArrayStoreException, 158 ClassCastException, 138, 200, 256 compile time errors, 90 EOFException, 232 error classes, 95 FileNotFoundException, 229, 248 IllegalAccessException, 156 InstantiationException, 156 InterruptedException, 62, 164 IOException, 216, 220, 229, 231, 239, 252, 256 MalformedURLException, 254 NullPointerException, 31, 92 NumberFormatException, 196 OutOfMemoryException, 384 overridden methods and, 137 ParseException (invented), 219 runtime exceptions, 100 SecurityException, 210 throwing exceptions on purpose, 100 UnknownHostException, 239, 252 UnknownServiceException, 254 escape sequences, 80 evaluation, order of, 87, 91 Event (class), 41 events, 40, 288-290, 379 determining source of, 299-300 @exception tag, 81 exceptions (see errors and exceptions) exists(), 228 exp(), 194 exponents/exponentials, 194 expressions, 87, 91-94 extends (keyword), 32, 379, 381 F false (value), 39 fields, 29 File constructor, 226 FileDialog (class), 226, 318-320 FileInputStream (class), 215, 229-231 FileNotFoundException, 229, 248 FileOutputStream (class), 215, 229-231 File.pathSeparator, 227 File.pathSeparatorChar, 227 files, 225-233 applets and, 232-233 audio, 294, 373-374 getting information about, 227-229 images (see images) nonexistent on server, 256 renaming, 228 restricting access to, 246-248 selecting from dialogs, 318-320 streams for, 229-231 tar, 262-267 File.separator, 208, 227 File.separatorChar, 227 fill3DRect(), 336 fillArc(), 335-336 fillOval(), 335-336 fillPolygon(), 336 fillRect(), 336, 346 fillRoundRect(), 336 FilteredImageSource (class), 373 filtering image data, 372-373 FilterInputStream (class), 217-220 FilterOutputStream (class), 217-220 final (modifier), 116, 126, 136, 379 classes, 189 static color values, 336 finalize(), 130, 379 finally clauses, 90, 102, 379, 389 first(), 327 float (type), 82, 84, 380 floating-point literals, 84, 378 isNaN(), 194 out-of-range values, 193 (see also double; float) floatValue(), 196 floor(), 194 FlowLayout (layout manager), 290, 323 flush(), 219 focus, GUI component, 289 fonts, 337-340 metrics, 338-340 for statements, 89 forbidden access to files, 246-248 forName(), 156 fragile base class, 11 Frame (object), 290, 297 BorderLayout, 290 FRAMEBITS (variable), 356 frames, menus and, 302-305 functional components, 295 G garbage collection, 11, 47, 129-130, 350, 380 Gaussian distributions, 197 gc(), 130 general exceptions, 100 (see also errors and exceptions) generic, 201 get(), 203 getAbsolutePath(), 227 getAbsolute(), 227 getAppletContext(), 295 getApplets(), 294 getAscent(), 340 getAudioClip(), 294, 374 getByName(), 251 getClass(), 155-156 getCodeBase(), 251, 293, 341 getColor(), 336 getComponent(), 307 getContent(), 255, 264 getCurrent(), 307 getDate(), 199 getDescent(), 340 getDocumentBase(), 293 getFamily(), 337 getFilePointer(), 232 getFile(), 254 getFocus(), 289 getFontMetrics(), 338 getFont(), 337, 340 getHeight(), getWidth(), 314, 340, 343 getHost(), 251, 254 getHours(), 199, 243 getImage(), 294, 341 getInputStream(), 239 getLabel(), 307 getLeading(), 340 getMaxAdvance(), 340 getMaxAscent(), 340 getMaxDescent(), 340 getMessage(), 176 getMinutes(), 199, 243 getMonth(), 199 getName(), 227, 337 getOuputStream(), 239 getParameter(), 40, 294 getParent(), 227 getPath(), 227 getProperty(), 206, 208 getProtocol(), 254 getRGBdefault(), 361 getSeconds(), 199 getSelectedItem(), 304 getSize(), 337 getState(), 307 getStyle(), 337 getText(), 301 getTime(), 199 getWidths(), 340 getWidth(), 314, 343 getYear(), 199 Gosling, James, 2 goto statements in C, 90 graphics (see images) Graphics (class), 36 graphics context, 36, 331, 380 origin of, 333 greater than (>) operator, 91 greater than or equal (>=) operator, 91 GridBagLayout (layout manager), 291, 321, 328 GridLayout (layout manager), 290, 297, 313, 323-324 guessContentTypeFromName(), 275 guessContentTypeFromStream(), 275 GUIs (graphical user interfaces), 40, 281-291, 380 components (see components, GUI) layout managers, 49, 290-291, 321-329 updating components, 286-287 H handleEvent(), 288 hashCode(), 153-154, 204 hashcodes, 204-206, 380 hashtables, 200-206, 380 for strings (see Properties) hasMoreElements(), 192, 202 hasMoreTokens(), 192 header files, 38 height attribute (<applet> tag), 73, 75 HEIGHT (variable), 356 help, xiii helper applications, 22 hexadecimal numbers, 83 hiding data (see encapsulation) HLS encoding, 361 home directory, user, 208 HorizBagLayout (layout manager), 328 hostnames, 238, 253, 380 hosts, security and, 20 HotJava Web browser, 24, 232, 257, 380 hspace attribute (<applet> tag), 75 HSV encoding, 361 HTML attributes align attribute (<applet>), 75 alt attribute (<applet>), 75 code attribute (<applet>), 73, 75 codebase attribute (<applet>), 76 height attribute (<applet>), 73, 75 hspace attribute (<applet>), 75 name attribute (<applet>), 75 vspace attribute (<applet>), 75 width attribute (<applet>), 73, 75 HTML tags <applet>, 72-77 <param>, 73, 385 unknown, browsers and, 74-75 HTTP daemon example, 243-248 I identity (==) operator, 50, 299 if-else clauses, 88 IllegalAccessException, 156 imageComplete(), 366 ImageConsumer (interface), 381 IMAGEERROR property, 366 ImageObserver (interface), 381 ImageProducer (interface), 381 images, 331-336, 341-373 colors in, 336 encoding as image data, 361-362 creating image data, 360-364 delayed loading, 314 double buffering, 349-351 filtering image data, 372-373 image consumers, 364-366 filtering, 372-373 image observers, 342-343, 353, 355-358 image producers, 353, 360-364 MVC and, 286 off-screen, 351-353 processing, 353-373 scrollbars with, 310-314 sequence of, 366-372 size of, 343 imageUpdate(), 355-358 implements clauses, 381 import statements, 38, 144, 381 in (System.in), 216 increment (++) operator, 91 incremental class development, 11 incrementaldraw property, 343 index [] operator, 103 indexed color models, 362 indexOf(), 188, 201 inequality (!=) operator, 91 InetAddress (object), 251 inheritance, 9, 32, 130-142, 381 private classes and, 131 initializing arrays, 104 local variables, 121 variables, 83 init(), 39, 292 versus constructors, 46 MediaTracker and, 359 input/output, 213-233 rejecting user input, 298 InputStream (class), 213, 215-217 insert(), 191 insertElement(), 201 installation directory, Java, 208 instance methods, 113, 382 instance variables, 38, 113, 382 instanceof operator, 91, 94, 200, 256, 382 target and, 299 instances, 382 class, 30, 112 InstantiationException, 156 int (type), 82-83, 382 integer literals, 83 converting double to, 194 parsing strings into, 218 integral operators, 91 << (leftwise shift), 91, 363 interactive TV (ITV), 3 interface (keyword), 149 interfaces, 9, 58, 86, 148-153, 382 packages and, 152 internationalization, 79 interpreter, 382 InterruptedException, 62, 164 Interrupt(), 164 intValue(), 196 invalid containers (see containers) inverse trigonometric functions, 194 invoking methods, 93 IOException, 216, 220, 229, 231, 239, 252, 256 isAbsolute(), 227 isConsumer(), 360 isDirectory(), 227 isFile(), 227 isNaN(), 194 ISO10646 encoding, 382 ISO8859-1 encoding, 80, 382 ITALIC (value), 337 iterative statements, 88 ITV (interactive TV), 3 J Java API packages, 183 applets (see applets) availability of, 25 compared to C, C++, 6 compiler (see javac) as general application language, 25 GUI concepts, 281-291 history of, 2-3 input/output, 213-233 interpreter, 4 numbers in, 39, 82 (see also primitive types; variables) online information about, xiii security manager (see security manager) security of, 8-21 version information, 208 WWW and (see World Wide Web) Java Development Kit (JDK), 25, 383 $JAVA directory, 69 .java extension, 69, 143, 377 java. hierarchy, 35 java (interpreter), 65-68 -noasyncgc option, 130 Java Open Language Toolkit (JOLT), 25 Java WorkShop, 25, 383 java.applet (see applets) java.applet.AudioClip, 374 java.awt, 279-329 java.awt.Color, 336 java.awt.FileDialog (see FileDialog) java.awt.FontMetrics, 338-340 java.awt.Fonts, 337-340 java.awt.Graphics (see images) java.awt.image.ColorModel, 361 java.awt.image.MemoryImageSource, 362 java.awt.MediaTracker, 358-360 java.awt.peer (see peer interfaces) javac (compiler), 28, 69-71 -O option, 136 unreachable statements and, 90 java.class.path, 208 java.class.version, 208 javadoc, 81 java.home, 208 java.io, 213-233 java.io.File, 225-229 java.lang package, 183-191 primitive type wrappers, 195 java.lang.Class, 155-156 java.lang.Object, 153-158 java.lang.SecurityManager (see security manager) java.lang.String (see strings) java.lang.StringBuffer (see StringBuffer) java.lang.System, 208 java.net, 235-278 java.net.DatagramSocket (see datagram sockets) java.net.InetAddress, 251 java.net.Socket (see sockets) java.net.URL (see URLs) java.net.URLStreamHandler (see URLStreamHandler) JavaScript language, 7, 383 java.util.Date (see dates and times) java.util.Dictionary, 206 java.util.Enumeration (see Enumeration interface) java.util.Math (class) (see math utilities) java.util.Properties, 206-208 java.util.Random (see random numbers) java.util.StringTokenizer, 192-193 java.util.Vector (see vectors) java.vendor, 208 java.vendor.url, 208 java.version, 208 J-code, 4 JDK (Java Development Kit), 25, 383 JOLT (Java Open Language Toolkit), 25 Joy, Bill, 2 K key values, 203 key-certification agency, 21 keyDown(), keyUp(), 288 KeyPad(object), 297 keys(), 204 keystrokes, 40 (see also events) L last(), 327 lastIndexOf(), 189 lastModified(), 228 Latin-1 encoding, 80 layout, 49 layout(), 291 layout managers, 49, 290-291, 301, 321-329, 383 null, 328 (see also specific layout manager) leading space (for fonts), 340 leftwise shift (<<) operator, 91, 363 length (variable), 106 length(), 186, 228-229 less than (<) operator, 91 less than or equal (<=) operator, 91 line comments (see comments) line.separator, 208 linked lists, 123 Lisp, 8, 10 list(), 207, 228 literals character, 84 floating-point, 84 integer, 83 string (see strings) loadFile(), 320 loading class files, 75 loading images, 314 load(), 207 local variables, 39, 118, 383 initializing, 121 logging, 221 logical complement (!) operator, 91 log(), 194 long (type), 82-83, 383 longjmp() statements in C, 95 longValue(), 196 loop(), 374 M main(), 66 MalformedURLException, 254 malloc in C/C++, 122 mark(), 219 math utilities, 193-198 MAX_PRIORITY (value), 181 max(), 194 MediaTracker (object), 358-360 memory, 11 (see also garbage collection) MemoryImageSource (class), 362 MenuItem (object), 304 menus, 302-305 method invocation, 93 method signature, 67 methods, 29, 87, 117-125, 383 abstract, 141 accessing, 113-115 binding, 10 constructor (see constructors) declaring, 113 finalizing, 130 instance, 113, 382 interfaces (see interfaces) local variables, 118 native, 5, 35, 384 overloading, 46, 123-125, 383 overriding, 134-137, 384 passing arguments to, 122-123 serializing, 170-172 static, 52, 115-117, 120, 137 virtual, 11 MIME (Multipurpose Internet Mail Extensions), 260-262 minimumSize(), 322 MIN_PRIORITY (value), 181 minus (-) operator, subtraction, 91 minus (-) operator, unary, 91 mkdir(), mkdirs(), 228 modal windows, 316 Model/View/Controller (see MVC framework) modification times, 71, 228 modifiers, 36, 384 monitors, 169 mouse events, 40-42 (see also events) mouseDown(), MouseUp(), 288 mouseDrag(), 40-42, 348 mouseMove(), 309 move(), 321 multidimensional arrays, 107 multiplication (*) operator, 91 multithreading (see threads) MVC framework, 285, 384 N name attribute (<applet> tag), 75 names applet, 73, 75 directories and files, 228 of fonts, 337 packages, 143 NaN (not a number) (value), 193, 384 native methods, 5, 35, 384 natural logarithms, 194 NEGATIVE_INFINITY (value), 193 nesting comments, 80 Netscape JavaScript, 7, 383 Navigator, 232, 259 network byte order, 242 Network Time Protocol (NTP), 241 networks, 235-278 new operator, 31, 45, 93, 113, 125-126, 384 multidimensional arrays and, 108 newInstance(), 156 newlines (see whitespace) NewtonScript, 15 next(), 327 nextDouble(), 197 nextElement(), 192, 202 nextFloat(), 197 nextGaussian(), 197 nextInt(), 197 nextLong(), 197 nextToken(), 192 -noasyncgc option (java), 130 nonexistent files, 256 NORM_PRIORITY (value), 181 not (!) operator, 61 not equal (see inequality operator) notify(), 172-174 notifyAll(), 173, 177, 221 -noverify option (java), 66 NTP (Network Time Protocol), 241 null (value), 31, 385 character, 83 reference, 92 NullPointerException, 31, 92 NumberFormatException, 196 numbers, 39, 82, 193 floating-point, 84 hexadecimal, 83 integer literals, 83 math utilities, 193-198 NaN (value), 193, 384 octal, 83 out-of-range values, 193 randomly generated, 194, 197 time/dates (see dates and times) (see also math utilities; primitive types; variables) O Oak language, 3 Object (class), 33, 153-158 objects, 30, 111-158, 385 accessing variables of, 93 applets (see applications) array (see arrays) creating (see new operator) destroying, 129-130 equivalency of (see equals()) Exception (see errors and exceptions) finalizing, 379 getting from URLs, 255-257 instances (see instances) pointers to (see references) security manager, 18 signatures for (see hashcodes) String (see strings) octal numbers, 83 off-screen drawing, 351-353 offScrImg (variable), 349 openStream(), 254 operating system information, 208 operators, 91-92 OR (^) operator, bitwise, 91 OR (^) operator, boolean, 91 OR (|) operator, bitwise, 91 OR (|) operator, boolean, 91 OR (||) operator, conditional, 91 order of evaluation, 87, 91 origin, graphics context, 333 os.arch, 208 os.name, 208 os.version, 208 out (see System.out) out-of-range values, 193 OutOfMemoryException, 384 output (see input/output) OutputStream (class), 213, 215-217 overloading, 9 add(), 290 constructors, 127-128 equals(), 154 indexOf(), lastIndexOf(), 188 methods, 46, 123-125, 383 print(), 220 overriding equals(), 154 methods, 134-137, 384 P packages, 9, 13, 34, 76-77, 142-145, 183, 385 compilation units, 143, 377 interfaces and, 152 MIME types and, 261 protocols into names for, 268 unnamed, 145 p.add(), 301 padding, applet, 75 paint(), 35, 286, 309, 332 Panel (object), 33, 287, 290, 297 FlowLayout, 290 @param tag, 81 <param> tags, 73, 385 parameters, applet, 73 parametric polymorphism, 123 parentheses (), 91 ParseException (invented), 219 parseInt(), 196 parseLong(), 196 parsing protocols, 269 tar files, 265 text, 192 URLs, 192, 254 passing arguments to methods, 122-123 path, class (see class paths) paths, 226, 253 path.separator, 208 PDAs (personal digital assistants), 3 peer interfaces, 282-286 peers, 385 Perl scripting language, 7 personal digital assistants (PDAs), 3 PI (value), 195 PipedInputStream (class), 214, 220-223 PipedOutputStream (class), 214, 220-223 pixels, 354 PLAIN (value), 337 play(), 374 plus (+) operator, addition, 91 plus (+) operator, unary, 91 pointers (see references) polar coordinates, 194 Polygon (object), 335 polymorphism, 123 pop-up messages (see dialogs) port numbers, 238 portability, 1, 4 positioning absolutely, 328 POSITIVE_INFINITY (value), 193 postEvent(), 289, 316 pow(), 194 preferredSize(), 322 prepareImage(), 314, 357 previous(), 327 primitive operators, 91 primitive types, 82-84, 122, 385 boolean, 82, 376 byte, 82, 376 char, 80, 82, 84, 376 double, 82, 84, 378 float, 82, 84, 380 int, 82-83, 382 long, 82-83, 383 short, 82, 387 streams for reading/writing, 217 wrappers for, 195 println(), 191, 220 PrintStream (class), 153, 214, 220 print(), 123-124, 220 priority of threads, 178-181 private (modifier), 14, 114, 146-148, 385 inheritance and, 131, 381 members, 36, 53 private protected, 146, 386 producer threads, 174-178 programs (see applications) Properties (class), 206-208 propertyNames(), 206 protected (modifier), 114, 146-148, 386 protocol handlers, 24, 257-259, 267-278, 386 protocols, 253 pseudo-random (see random numbers) public (modifier), 114, 144, 146-148, 386 classes, javac compiler and, 70 members, 36 public-key cryptography, 20 put(), 203 putMessage(), 176 Q queries, 316-318 R random numbers, 194, 197 RandomAccessFile (class), 230-232 RANDOMPIXELORDER property, 365 random(), 194 read(), 216, 221 data buffer with, 219 readability, checking for, 228 readInt(), 218 readLine(), 217, 222 readUTF(), 218 read(), 142 rectangular coordinates, 194 redrawing GUI components, 286-287 redrawrate property, 343 reference (*) operator in C, 92 reference types, 84-86, 386 references, 12, 31, 85 callbacks, 151-152, 376 casting and, 138-139 default initial value for, 39 setting to null, 167 when passing arguments, 122 rejecting user input, 298 relative URLs, 253 remainder (%) operator, 91 remove(), 204 removeConsumer(), 360 removeElement(), 202 renameTo(), 228 repaint(), 42, 287, 309, 332, 343 requestTopDownLeftRightResend(), 360 reset(), 219 reshape(), 321 resize(), 309, 321 restricting file access, 246-248 resume(), 164 return statements, 102 @return tag, 81 RGB encoding, 361 RGBImageFilter (class), 373 rightwise shift (>>) operator, 91 rightwise shift (>>>) operator, 91 rint(), 194 roots, 386 rot13, 224, 270 round(), 194 run(), 58 run(), 60-61, 160 Runnable interface, 59, 160-164 runtime exceptions, 100 (see also errors and exceptions) run-time typing, 11 RuntimeExceptions ClassCastException, 138, 200, 256 NumberFormatException, 196 S sameFile(), 254 save(), 207 saveFile(), 320 say(), 170 scalability, 13 scalar types in C (see primitive types) scaling images, 343 scheduling threads, 178-181 scripting languages, 7 scrollbars, 310-314 security, 1, 8-14 application-level, 19-21 authentication, 21 implementation safety, 14-18 sockets and, 241 TCP/IP, 241 security manager, 18-19, 208-211, 387 applets and files, 232-233 HTTP daemon, 246-248 SecurityException, 210 @see tags, 81 seek(), 232 serializing methods, 170-172 servers, 237-241, 278, 387 nonexistent files on, 256 ServerSocket (object), 237, 240 setCheckboxGroup(), 307 setColorModel(), 366 setColor(), 336 setDaemon(), 165 setDimensions(), 366 setFont(), 337 setHints(), 365 setjmp() statements in C, 95 setLayout(), 290, 321 setMenuBar(), 305 setPixels(), 360-361 setProperties(), 366 setSecurityManager(), 209 setText(), 301 setTitle(), 304 setURL(), 272 shadowing variables, 119, 132-134, 387 short (type), 82, 387 show(), 320, 327 showDocument(), 295 showStatus(), 295 signature digital (see digital signature) method (see method signature) sin(), 194 sine, 194 single inheritance, 131 SINGLEFRAME property, 365 SINGLEFRAMEDONE property, 366 SINGLEPASS property, 365 size applet, 73, 75 arranging GUI components by, 323 file, 228 font, 337 GUI components, 322 image, 343 size operator in C, 92 size(), 202 skip(), 217 slash (/) in paths, 226 sleep(), 61, 178 Smalltalk, 8, 10 smart components, 296 smart containers, 297-299 sockets, 235-248, 387 datagram, 248-253 security and, 241 SOMEBITS (variable), 356 sound files, 294, 373-374 source code (see code, source) compilation units, 377 speed, 1, 16 sqrt(), 194 stack-of-cards configuration (see CardLayout) start(), 58-60, 161, 293 startProduction(), 360 startsWith(), 188 statements, 87-90 unreachable, 90 static (modifier), 115-117, 387 code blocks, 128-129 final color values, 336 members, 52 methods, 120, 137, 377 types, 82 variables, 377 STATICIMAGEDONE property, 366 stop(), 58-60, 161, 164, 293, 374 suspend() versus, 168 streams, 213-225, 387 created from strings, 223 file, 229-231 URLs and, 254 wrappers for, 217-220 String (class/object) (see strings) string concatenation (+) operator, 9, 86, 91, 186, 191 StringBuffer (class), 189-191 StringBufferInputStream (class), 223-224 StringBufferOutputStream (class), 223-224 strings, 45, 86, 184-193, 387 backslashes in, 227 charAt(), 187 comparing, 187 constructors for, 185-186 converting to and from, 186-187 creating streams from, 223 editing, 189 equality of, 153 hashtable for, 206-208 parsing into integers, 218 parsing into words, 192 searching for substrings in, 188 streams for reading/writing, 217 toCharArray(), 187 valueOf(), 186 StringTokenizer (class), 192-193 stringWidth(), 340 strtok() in C, 192 struct (keyword) in C, 376 subclasses, 32, 49, 130-142, 388 of Thread class, 163 visibility and, 148 (see also classes; inheritance) subinterfaces, 153 substring(), 189 substrings (see strings) subtraction (-) operator, 91 Sun's HotJava (see HotJava Web browser) super(), 139-141 super (keyword), 133, 137-138, 388 superclasses, 32 suspend(), 164 stop() versus, 168 switch statements, 89 Symantec Cafe, 25 synchronization (see threads) synchronized (modifier), 54, 63, 90, 126, 171, 388 syntax, Java, 9 System (class), 208 System.currentTimeMillis(), 199 System.err, 216, 220 System.gc(), 130 System.in, 216 System.out, 124, 207, 216, 220 System.out.println(), 191, 220 T tabs (see whitespace) tangent, 194 tan(), 194 tar files, 262-267 target (variable), 299 targets, 50 Tcl scripting language, 7 TCP (Transmission Control Protocol), 388 terminal input/output, 215-217 text alternate for browsers, 75 encoding, 79-80 fonts, 337-340 text GUI components, 300-302 TextArea, 289, 300-301 TextField, 289, 300-301 this (keyword), 40, 119, 137-138, 343, 389 this(), 127-128 Thread (class), 57, 160-164 threads, 56-58, 159-181, 389 communicating between, 220 multithreading, 13, 56 priority, 178-181 producer and consumer, 174-178 synchronization, 13, 54, 57, 62, 169-178, 388 versus concurrency, 13 wait() and notify(), 172-174 yield() with, 181 throw statements, 61, 100, 379, 389 (see also errors and exceptions) throws clauses, 99, 389 times (see dates and times) toByteArray(), 223 toCharArray(), 187 Toolkit, 389 TOPDOWNLEFTRIGHT property, 365 toString(), 153, 187, 191, 223 translate(), 333 transparency (see ARGB color model) triangular arrays, 109 trim(), 189 true (value) (see boolean) try statements, 61-62, 90, 97, 101, 376, 379, 389 types, 31, 81-86 array, 103 casting and, 138-139, 376 checking, 9 primitive, 82-84, 122 boolean, 39, 82, 376 byte, 82, 376 char, 80, 82, 84, 376 double, 82, 84, 378 float, 82, 84, 380 int, 82-83, 382 long, 82-83, 383 short, 82, 387 streams for reading/writing, 217 reference, 84-86 state of, 17 void, 91 U UCS (universal character set), 382, 390 UDP (User Datagram Protocol), 248, 390 unary minus (-) operator, 91 unary plus (+) operator, 91 Unicode character encoding, 79, 382, 390 Uniform Resource Names (URNs), 34, 253 UnknownHostException, 239, 252 UnknownServiceException, 254 unnamed packages, 145 unreachable statements, 90 update(), 286, 332 using effectively, 345-353 updating GUI components, 286-287 image data, 364-372 URLConnection (class), 258, 264, 269, 273-276 URLContentHandler (class), 258 URLs (Uniform Resource Locators), 235, 253-257 base versus relative, 253 parsing, 192 streams and, 254 URL class, 254 of vendor, 208 URLStreamHandler (class), 267-273 URLStreamHandlerFactory (object), 267 URNs (Uniform Resource Names), 34, 253 User Datagram Protocol (UDP), 248, 390 user input, rejecting, 298 user.dir property, 208, 226 user.home, 208 user-level security, 19-21 user.name, 208 UTF-8 encoding, 218, 390 V validate(), 291, 321 VariableGridLayout (layout manager), 328 variables, 29, 31 arrays (see arrays) assigning, 92 class, 377 converting to/from strings, 186-187 declaring, 31, 83, 87, 113 default values for, 83 dot (.) notation, 93, 114 encapsulation (see encapsulation) instance, 38, 113, 382 interface, 152 local, 39, 118, 121, 383 shadowing, 119, 132-134, 387 static, 52, 115-117 type checking, 9 (see also types) vectors, 196, 200-206, 390 vendor information, 208 verifiers, byte-code, 15-17, 66, 390 -verify option (java), 66 -verifyremote option (java), 66 version information Java, 208 operating system, 208 @version tag, 81 VerticalBagLayout (layout manager), 328 viewing applets, 77, 293-295, 376 virtual machines, 4-5 methods, 11 visibility modifiers, 114, 145-148 classes and, 144 private, 14, 36, 53, 131, 385 protected, 386 public, 36, 70, 386 subclasses and, 148 (see also encapsulation) Visual BASIC, 15 void (type), 91 vspace attribute (<applet> tag), 75 W wait(), 172-174, 221 Web browsers, 257-259 HotJava, 24, 232, 257, 380 Netscape Navigator, 232, 259 responding to unknown tags, 74-75 whitespace trim(), 189 as word delimiter, 192 width attribute (<applet> tag), 73, 75 WIDTH (variable), 356 Windows 95, 320 Wksh scripting language, 7 words, parsing strings into, 192 working directory, user, 208 World Wide Web (WWW), 22-24 browsers (see Web browsers) wrappers classes for, 82 for primitive types, 195 stream, 217-220 writability, checking for, 228 write(), 221 data buffer with, 219 writeInt(), 218 writeUTF(), 218 X XOR (^) operator, bitwise, 91 XOR (^) operator, boolean, 91 Y years (see dates and times) yes/no dialogs (see queries) yield(), 181 Z ZIP files, 68, 262
Return to Exploring Java
About O'Reilly | Contact | Jobs | Press Room | How to Advertise | Privacy Policy
© 2006, O'Reilly Media, Inc.
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.