⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch38.htm

📁 Java_by_Example,初级经典例子哦,珍藏版本
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<HTML><HEAD><TITLE>developer.com - Reference</TITLE><META NAME="Author" CONTENT="developer.com"><META NAME="Keywords" CONTENT="javascript, ActiveX, VRML, Push, channel,push channel, applet, directory, news, community, developer, internet,intranet, java, java applet, J++, javabeans, java products, tools, javatools, JDK, java development kit, java development environment, JIT,JavaPlan, enterprise tools, JVM, Java Virtual Machine, Java resources, API,browser, java documentation, CDF, Common Desktop Format, RDF, ResourceDescription Framework, Netcaster, Netcast, Castanet, meta-language, metadata,solaris, Solaris, SUN, CGI, Perl, Oracle, database, network, Netscape API,Apache, apache, SSL, mSQL, Netscape, Fasttrack, FastTrack,industry standard, ActiveX bridge, web, internet, site, sitedesign, microsoft, active server pages, asp, iis, nt, win95, 95, html, cgi,frontpage, business, corporate, vbscript, javascript, activex, isapi,database, access, sql, server, www, 3.0, 3.01, 3.02, 3.03, 3.04, 4.0,4.0b2, 4.01, 4.03, 4.04, connection, online, commerce, publisher,publishing, publish, webmaster, dynamic html, dhtml, windows 98, netscape,netscape software, shareware, magazines, jobs, japan, free, freeware, freestuff"><META NAME="description" CONTENT="Developer.com is the leading onlineservice for developers. It includes Gamelan, the official directory for Java, as wellas news, information, tutorials, and directories for other Internet technologiesincluding ActiveX, JavaScript, perl, VRML, Java Beans, push technologies, andother Internet and intranet technologies. Developer.com is also the home ofDeveloper Direct, the Professional Developer's Store, where developers canpurchase and download thousands of Web, authoring and other developmentproducts at some of today's lowest prices."><META NAME="distribution" CONTENT="global"><META NAME="resource-type" CONTENT="document"><META NAME="language" CONTENT="en"></HEAD><BODY BACKGROUND="/images/curve_r-wide.gif" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#DD0000" VLINK="#999999" ALINK="#FF0000"><TABLE><TR><TD VALIGN=TOP WIDTH=120><A HREF="/" ><IMG SRC="/images/masthead_r.gif" WIDTH="100" HEIGHT="78" BORDER="0"ALT="Developer.com Logo"></a></TD><TD><a target="resource window" href="http://adserver.developer.com/cgi-bin/accipiter/adclick.exe/AREA=DCBAN.REF/DT=null"><img src="http://adserver.developer.com/cgi-bin/accipiter/adserver.exe/AREA=DCBAN.REF/DT=null" HEIGHT="60" WIDTH="468" ALT="Click here to support our advertisers"><BR><CENTER>Click here to support our advertisers</CENTER></a></TD></TR></TABLE><!--outer table--><TABLE><!--outer table--><TR><!--outer table--><TD VALIGN="TOP"><!--navbar info --><table><tr><td><A HREF="http://www.developerdirect.com/" ><IMG SRC="/images/button_s.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><b>SHOPPING</b></font></a></td></tr><tr><td><A HREF="/community/jobs/c_jobs.html"><IMG SRC="/images/button_d.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><B>JOB BANK</B></font></a></td></tr><tr><td><A HREF="http://www.classifieds2000.com/cgi-cls/display.exe?Developer+computer+searchcomputercategories"><IMG SRC="/images/button_d.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><B>CLASSIFIEDS</B></font></a></td></tr><tr><td><A HREF="/directories/directories.html"><IMG SRC="/images/button_d.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><B>DIRECTORIES</B></font></a></td></tr><tr><td><A HREF="/reference/"><IMG SRC="/images/button_r.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><B>REFERENCE</B></font></a><br><a href="/reference/r_library.html"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000">Online Library</a></font></td></tr><tr><td><A HREF="/classroom/"><IMG SRC="/images/button_r.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><B>LEARNING CENTER</B></font></a></td></tr><tr><td><A HREF="/journal/"><IMG SRC="/images/button_n.gif" width="15" height="11" BORDER="0"><B><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000">JOURNAL</font></B></a></td></tr><tr><td><A HREF="/news/"><IMG SRC="/images/button_d.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><b>NEWS CENTRAL</b></font></a></td></tr><tr><td><A HREF="/downloads/"><IMG SRC="/images/button_d.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><b>DOWNLOADS</b></font></a></td></tr><tr><td><A HREF="/community/" ><IMG SRC="/images/button_c.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><B>COMMUNITY</B></font></a></td></tr><tr><td><A HREF="/calendar/"><IMG SRC="/images/button_d.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><b>CALENDAR</b></font></a></td></tr><tr><td><A HREF="/about/"><IMG SRC="/images/button_a.gif" width="15" height="11" BORDER="0"><FONT FACE="Arial, Helvetica" SIZE="-1" color="#000000"><b>ABOUT US</b></a></font></td></tr></table><table><tr><td><form action="/subscribe/list.cgi" method=post ><img src="/images/rule.gif" width="100" height="2"><br><B><FONT FACE="Arial, Helvetica" SIZE="-1">Journal:</b></font><br><input name='email' value='your e-mail' size="11"><input type='hidden'  name='state' value='Subscribe'></td></tr><tr><td><input type='submit' value='Subscribe'><br><font size="-1">Get the weekly email highlights from the most popular journal for developers!<br><a href="http://www.developer.com/subscribe.html">Current issue</a><img src="/images/rule.gif" width="100" height="2"><input type='hidden' name='name' value='New Subscriber'></FORM></td></tr></table><!--/navbar--><font size="-1"><A HREF="http://www.developer.com">developer.com</a><BR><A HREF="http://www.developerdirect.com">developerdirect.com</a><BR><A HREF="http://www.htmlgoodies.com">htmlgoodies.com</a><BR><A HREF="http://www.javagoodies.com">javagoodies.com</a><br><A HREF="http://www.jars.com">jars.com</a><BR><a href="http://www.intranetjournal.com">intranetjournal.com</a><br><a href="http://www.javascripts.com">javascripts.com</a><br></font><!--outer table--></TD><!--outer table--><TD VALIGN="TOP"><BLOCKQUOTE><P><img src="/images/header_r.gif" width="440" height="50"><P><MAP NAME ="header_r2.gif.map"><AREA SHAPE ="RECT"      HREF ="/reference/author.html"      COORDS ="361,0,440,29"><AREA SHAPE ="RECT"      HREF ="/reference/basic.html"      COORDS ="254,0,360,29"><AREA SHAPE ="RECT"      HREF ="/reference/help.html"      COORDS ="183,0,251,29"><AREA SHAPE ="RECT"      HREF ="/reference/cool.html"      COORDS ="100,0,181,29"><AREA SHAPE ="RECT"      HREF ="/reference/mybook.html"      COORDS ="0,0,100,29"></MAP><MAP NAME ="header_r1.gif.map"><AREA SHAPE ="RECT"      HREF ="/reference/personalize.html"      COORDS ="339,0,439,29"></MAP><p><font face="Arial,Helvetica" size="-1" color="#006666"><A HREF="/reference/r_library.html"><B>All Categories</A> :</B><b><A HREF="/reference/r_java.html">Java</A></b></font><p><META><H1><FONT SIZE=6 COLOR=#Ff0000>Appendix&nbsp;B</FONT></H1><H1><FONT SIZE=6 COLOR=#Ff0000>Glossary</FONT></H1><HR><P><B>applet</B>&nbsp;&nbsp;A small Java program that's embeddedin an HTML document.<P><B>argument</B>&nbsp;&nbsp;A value that is sent to a method whenthe method is called.<P><B>array</B>&nbsp;&nbsp;A list of values of the same type. Allvalues in an array have a common name.<P><B>ascent</B>&nbsp;&nbsp;The height of a character from the baselineto the top of the character.<P><B>ASCII</B>&nbsp;&nbsp;A standard set of values for representingtext characters.<P><B>assembly language</B>&nbsp;&nbsp;The lowest-level, and mostdifficult, language you can use to program a computer.<P><B>assignment expression</B>&nbsp;&nbsp;Assigns a value to a variable.<P><B>base class</B>&nbsp;&nbsp;The class from which another classinherits functionality. In Java, a base class is often calleda superclass.<P><B>bit</B>&nbsp;&nbsp;The smallest piece of data a computer understands.A bit can represent only two values, 0 or 1.<P><B>bitmap</B>&nbsp;&nbsp;A graphical image that's usually storedin a file. Windows bitmap files have a BMP extension. However,bitmap is sometimes used as a general term describing any graphicalimage stored in a file, including GIF and JPEG graphics files.<P><B>body of a loop</B>&nbsp;&nbsp;The program lines that are executedinside the loop.<P><B>Boolean</B>&nbsp;&nbsp;A value that can be either true or false.<P><B>Boolean expression</B>&nbsp;&nbsp;Same as a logical expression.That is, a Boolean expression evaluates to either <TT>true</TT>or <TT>false</TT>.<P><B>branching</B>&nbsp;&nbsp;When an execution of a computer programjumps forward or backward in the program.<P><B>breakpoint</B>&nbsp;&nbsp;A location in a program at whicha debugger halts program execution and waits for a command.<P><B>byte</B>&nbsp;&nbsp;In Java, the <TT>byte</TT> data type, whichis eight bits long, can hold a range of values from -127 to 128.<P><B>byte-code</B>&nbsp;&nbsp;The format of compiled Java programs.Byte-code files are similar to machine-code files, except thatthey can be executed on any operating system that has a Java interpreter.Byte-code files have the .class file extension.<P><B>canvas</B>&nbsp;&nbsp;A applet component that can display graphicsand text.<P><B>casting</B>&nbsp;&nbsp;Telling Java's compiler that it's okayto convert one type of value to another.<P><B>character</B>&nbsp;&nbsp;A value used in text. For example,the letters A-Z, the digits 0-9 (when not used as mathematicalvalues), spaces, and even tabs and carriage returns are all characters.<P><B>class</B>&nbsp;&nbsp;A template for an object. A class generallycontains data fields and methods.<P><B>client</B>&nbsp;&nbsp;A program that relies on services providedby another program called a server.<P><B>code base</B>&nbsp;&nbsp;The directory from which an appletis loaded.<P><B>comparison operators</B>&nbsp;&nbsp;Operators like <TT>==</TT>(equals) and <TT>&gt;</TT> (greater than) that compare two expressions,giving a result of <TT>true</TT> or <TT>false</TT>.<P><B>concatenate</B>&nbsp;&nbsp;Adding one text string to the endof another.<P><B>conditional branching</B>&nbsp;&nbsp;When a program jumps toa different part of a program based on a certain condition beingmet.<P><B>configurable applet</B>&nbsp;&nbsp;An applet that the usercan customize by supplying different parameters when writing theapplet's tag in an HTML document<P><B>constant</B>&nbsp;&nbsp;A value that never changes throughoutthe life of a program.<P><B>constructor</B>&nbsp;&nbsp;A special method that initializesan object when the object is created. In the class, a constructorhas the same name as the class.<P><B>control variable</B>&nbsp;&nbsp;The variable that a programevaluates to determine whether or not to perform an action. Controlvariables are used in loops, <TT>switch</TT> statements, and othersimilar programming constructs.<P><B>data field</B>&nbsp;&nbsp;The data that's encapsulated in anobject.<P><B>data type</B>&nbsp;&nbsp;The type of value represented by aconstant, variable, or some other program object. Java data typesinclude the integer types <TT>byte</TT>, <TT>short</TT>, <TT>int</TT>,and <TT>long</TT>; the floating-point types <TT>float</TT> and<TT>double</TT>; the character type <TT>char</TT>; and the Booleantype <TT>boolean</TT>.<P><B>deadlock</B>&nbsp;&nbsp;Deadlock occurs when two or more threadsare waiting for resources that they can't get. An example wouldbe when one thread must access Method1 before it can release itshold on Method2, but the second thread must access Method2 beforeit can release its hold on Method1. Because these are mutuallyexclusive conditions, the threads are deadlocked and cannot run.<P><B>decrement</B>&nbsp;&nbsp;Decrease the value of a variable.<P><B>derived class</B>&nbsp;&nbsp;A class that inherits from a baseclass.<P><B>descent</B>&nbsp;&nbsp;The height of the area that hold thedescending portion of letters, such as the tail on a lowercase&quot;g.&quot;<P><B>dialog box</B>&nbsp;&nbsp;A special pop-up window that canpresent important information to the user or that requests informationfrom the user. A dialog box is an object of Java's <TT>Dialog</TT>class.<P><B>doc tags</B>&nbsp;&nbsp;Special symbols used by the javadoctool to document Java packages and methods.<P><B>document base</B>&nbsp;&nbsp;The directory from which an HTMLdocument is loaded.<P><B>double</B>&nbsp;&nbsp;In Java, the <TT>double</TT> data type,which is 62 bits in length, can hold values in the range -1.79769313486232x 10 308 to 1.79769313486232 x 10 308. This type of value in calleda double-precision floating-point number.<P><B>dynamic linking</B>&nbsp;&nbsp;When functions called withina program are associated with the program at runtime rather thanat compile time.<P><B>encapsulation</B>&nbsp;&nbsp;In object-oriented programming,this is the technique of enclosing data and the functions thatact on that data all within an object.<P><B>exception</B>&nbsp;&nbsp;Exceptions inform a running programof serious errors and enable the program to manage the errorswithout risk of crashing the system.<P><B>exponentiation</B>&nbsp;&nbsp;Using exponents to raise a basenumber to a power, as in the expression 10 3.<P><B>expression</B>&nbsp;&nbsp;A line of program code that can bereduced to a value or that assigns a value.<P><B>field</B>&nbsp;&nbsp;A data object encapsulated in a class.<P><B>float</B>&nbsp;&nbsp;In Java, the <TT>float</TT> data type,which is thirty-two bits long, can hold values in the range of&#173;3.402823 x 10 38 to around 3.402823 x 10 38. This type ofvalue is called a single-precision floating-point number.<P><B>floating point</B>&nbsp;&nbsp;A value with both whole number(including zero) and fractional parts. For example, the value25.75 is a floating-point number.<P><B>font</B>&nbsp;&nbsp;A set of characters of the same style.<P><B>frame window</B>&nbsp;&nbsp;A special pop-up window that canbe displayed from an applet. A frame window is an object of Java's<TT>Frame</TT> class.<P><B>GIF</B>&nbsp;&nbsp;One type of data format for storing graphicalimages on disk.<P><B>GUI</B>&nbsp;&nbsp;Stands for Graphical User Interface. It'spronounced like &quot;gooey.&quot;<P><B>hard-coded</B>&nbsp;&nbsp;When a literal value, such as 35,is written into a program. Values that are used often in a programare frequently better represented by symbolic constants ratherthan hard-coded values.<P><B>high-level language</B>&nbsp;&nbsp;A computer language thatisolates the programmer from the intricate details of programminga computer. Java is a high-level language. Assembly language,on the other hand, is a low-level language.<P><B>HTML</B>&nbsp;&nbsp;Hypertext Markup Language. The scriptinglanguage used to create Web pages.<P><B>identifier</B>&nbsp;&nbsp;A symbol that represents a programobject. For example, an identifier for a variable might be <TT>amountOfPurchase</TT>,whereas an identifier for a function might be <TT>CalcAverage</TT>.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -