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

📄 ewtoc.html

📁 Java_by_Example,初级经典例子哦,珍藏版本
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<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><P><FONT FACE="Arial,Helvetica" SIZE="-1">To access the contents, click the chapter and section titles.</FONT><P><B>JAVA&#153; BY EXAMPLE</b><img src="/images/new.gif" height=17 width=48 border=0 alt="new"><A TARGET="resource window" HREF="http://www.developerdirect.com/product.cgi/6034/105" ><img src="/images/buybutton.gif" height=17 width=48 border=0 alt="buy it"></a><FONT SIZE="-1"><Br><I>(Imprint: QUE)</i><br>Author: <A HREF="/reference/author.html#walcla" >Clayton Walnum</a><Br><FONT SIZE="-1">Publication Date: Jun-96<br>ISBN: 0-789-70814-0</font><Br><img src="/images/rule.gif" width="460" height="5" vspace="5"><br><font size="-1"><blockquote><A HREF="ch1.htm"><b>Chapter 1:</b> Java Overview</A><UL><LI><A HREF="ch1.htm#TheJavaStory">The Java Story</A><LI><A HREF="ch1.htm#IntroducingJava">Introducing Java</A><LI><A HREF="ch1.htm#JavaPrograms">Java Programs</A><LI><A HREF="ch1.htm#TheJavaDevelopersKit">The Java Developer's Kit</A><LI><A HREF="ch1.htm#WhereIsJava">Where Is Java?</A><LI><A HREF="ch1.htm#ExampleInstallingHotJava">Example: Installing HotJava</A><LI><A HREF="ch1.htm#ExampleInstallingtheJDK">Example: Installing the JDK</A><LI><A HREF="ch1.htm#Summary">Summary</A><LI><A HREF="ch1.htm#ReviewQuestions">Review Questions</A><LI><A HREF="ch1.htm#ReviewExercises">Review Exercises</A></UL><A HREF="ch2.htm"><b>Chapter 2:</b> Running Java Applets</A><UL><LI><A HREF="ch2.htm#TheSampleJavaApplets">The Sample Java Applets</A><UL><LI><A HREF="ch2.htm#TheAppletviewerTool">The Appletviewer Tool</A><LI><A HREF="ch2.htm#ExampleRunningTicTacToe">Example: Running TicTacToe</A><LI><A HREF="ch2.htm#TheAnimatorApplet">The Animator Applet</A><LI><A HREF="ch2.htm#TheBarChartApplet">The BarChart Applet</A><LI><A HREF="ch2.htm#OtherDemoApplets">Other Demo Applets</A></UL><LI><A HREF="ch2.htm#AddingAppletstoanHTMLDocument">Adding Applets to an HTML Document</A><UL><LI><A HREF="ch2.htm#OptionalAttributesforApplets">Optional Attributes for Applets</A><LI><A HREF="ch2.htm#AppletParameters">Applet Parameters</A><LI><A HREF="ch2.htm#NonJavaBrowsers">Non-Java Browsers</A><LI><A HREF="ch2.htm#ExampleAJavaPoweredHomePage">Example: A Java-Powered Home Page</A></UL><LI><A HREF="ch2.htm#Summary">Summary</A><LI><A HREF="ch2.htm#ReviewQuestions">Review Questions</A><LI><A HREF="ch2.htm#ReviewExercises">Review Exercises</A></UL><A HREF="ch3.htm"><b>Chapter 3:</b> Applets and the Internet</A><UL><LI><A HREF="ch3.htm#LocalandRemoteApplets">Local and Remote Applets</A><UL><LI><A HREF="ch3.htm#LocalApplets">Local Applets</A><LI><A HREF="ch3.htm#RemoteApplets">Remote Applets</A></UL><LI><A HREF="ch3.htm#ClientsandServers">Clients and Servers</A><LI><A HREF="ch3.htm#Security">Security</A><LI><A HREF="ch3.htm#ExampleYourPagesontheWeb">Example: Your Pages on the Web</A><LI><A HREF="ch3.htm#Summary">Summary</A><LI><A HREF="ch3.htm#ReviewQuestions">Review Questions</A><LI><A HREF="ch3.htm#ReviewExercises">Review Exercises</A></UL><A HREF="ch4.htm"><b>Chapter 4:</b> Object-Oriented Programming Concepts</A><UL><LI><A HREF="ch4.htm#FromSwitchestoObjects">From Switches to Objects</A><LI><A HREF="ch4.htm#AnObviousYetBrilliantSolution">An Obvious, Yet Brilliant, Solution</A><LI><A HREF="ch4.htm#ObjectOrientedProgramming">Object-Oriented Programming</A><UL><LI><A HREF="ch4.htm#Encapsulation">Encapsulation</A><LI><A HREF="ch4.htm#ClassesasDataTypes">Classes as Data Types</A><LI><A HREF="ch4.htm#Inheritance">Inheritance</A><LI><A HREF="ch4.htm#Polymorphism">Polymorphism</A><LI><A HREF="ch4.htm#ExampleEncapsulationInheritanceandPolymorphism">Example: Encapsulation, Inheritance, and Polymorphism</A></UL><LI><A HREF="ch4.htm#Summary">Summary</A><LI><A HREF="ch4.htm#ReviewQuestions">Review Questions</A><LI><A HREF="ch4.htm#ReviewExercises">Review Exercises</A></UL><A HREF="ch5.htm"><b>Chapter 5:</b> Constants and Variables</A><UL><LI><A HREF="ch5.htm#Constants">Constants</A><LI><A HREF="ch5.htm#Variables">Variables</A><LI><A HREF="ch5.htm#NamingConstantsandVariables">Naming Constants and Variables</A><LI><A HREF="ch5.htm#ExampleCreatingYourOwnIdentifiers">Example: Creating Your Own Identifiers</A><LI><A HREF="ch5.htm#DataTypes">Data Types</A><UL><LI><A HREF="ch5.htm#IntegerValues">Integer Values</A><LI><A HREF="ch5.htm#FloatingPointValues">Floating-Point Values</A><LI><A HREF="ch5.htm#CharacterValues">Character Values</A><LI><A HREF="ch5.htm#BooleanValues">Boolean Values</A></UL><LI><A HREF="ch5.htm#VariableScope">Variable Scope</A><UL><LI><A HREF="ch5.htm#ExampleDeterminingaVariablesScope">Example: Determining a Variable's Scope</A></UL><LI><A HREF="ch5.htm#Summary">Summary</A><LI><A HREF="ch5.htm#ReviewQuestions">Review Questions</A><LI><A HREF="ch5.htm#ReviewExercises">Review Exercises</A></UL><A HREF="ch6.htm"><b>Chapter 6:</b> Simple Input and Output</A><UL><LI><A HREF="ch6.htm#WindowsandGraphics">Windows and Graphics</A><LI><A HREF="ch6.htm#DisplayingTextinanApplet">Displaying Text in an Applet</A><UL><LI><A HREF="ch6.htm#ExampleCreatingandRunningApplet">Example: Creating and Running Applet1</A><LI><A HREF="ch6.htm#HowAppletWorks">How Applet1 Works</A></UL><LI><A HREF="ch6.htm#GettingInputfromtheUser">Getting Input from the User</A><UL><LI><A HREF="ch6.htm#HowAppletWorks1">How Applet2 Works</A><LI><A HREF="ch6.htm#ExampleRetrievingtextfromaITextFieldIcontrol">Example: Retrieving text from a <I>TextField</I> control</A><LI><A HREF="ch6.htm#HowAppletWorks2">How Applet3 Works</A></UL><LI><A HREF="ch6.htm#DisplayingNumericalValues">Displaying Numerical Values</A><LI><A HREF="ch6.htm#Summary">Summary</A><LI><A HREF="ch6.htm#ReviewQuestions">Review Questions</A><LI><A HREF="ch6.htm#ReviewExercises">Review Exercises</A></UL><A HREF="ch7.htm"><b>Chapter 7:</b> Math Operators</A><UL><LI><A HREF="ch7.htm#TheAdditionOperator">The Addition Operator</A><UL><LI><A HREF="ch7.htm#ExampleUsingtheAdditionOperator">Example: Using the Addition Operator</A><LI><A HREF="ch7.htm#ExampleMultipleAdditions">Example: Multiple Additions</A></UL><LI><A HREF="ch7.htm#TheSubtractionOperator">The Subtraction Operator</A><UL><LI><A HREF="ch7.htm#ExampleUsingtheSubtractionOperator">Example: Using the Subtraction Operator</A><LI><A HREF="ch7.htm#ExampleMultipleSubtractionsUsingMixedDataTypes">Example: Multiple Subtractions Using Mixed Data Types</A><LI><A HREF="ch7.htm#ExampleCastingaResulttoaDifferentDataType">Example: Casting a Result to a Different Data Type</A></UL><LI><A HREF="ch7.htm#TheMultiplicationOperator">The Multiplication Operator</A><UL><LI><A HREF="ch7.htm#ExampleMultiplicationandDataTypes">Example: Multiplication and Data Types</A></UL><LI><A HREF="ch7.htm#TheDivisionOperator">The Division Operator</A><UL><LI><A HREF="ch7.htm#ExampleIntegerVersusFloatingPointDivision">Example: Integer Versus Floating-Point Division</A></UL><LI><A HREF="ch7.htm#TheModuloOperator">The Modulo Operator</A><LI><A HREF="ch7.htm#TheIncrementOperator">The Increment Operator</A><LI><A HREF="ch7.htm#TheDecrementOperator">The Decrement Operator</A><LI><A HREF="ch7.htm#ExampleUsingMathematicalCalculationsinanApplet">Example: Using Mathematical Calculations in an Applet</A><UL><LI><A HREF="ch7.htm#HowAppletWorks">How Applet5 Works</A></UL><LI><A HREF="ch7.htm#TheOrderofOperations">The Order of Operations</A><UL><LI><A HREF="ch7.htm#ExampleOrderofOperations">Example: Order of Operations</A><LI><A HREF="ch7.htm#ExampleMoreOrderofOperations">Example: More Order of Operations</A><LI><A HREF="ch7.htm#ExampleStillMoreOrderofOperations">Example: Still More Order of Operations</A><LI><A HREF="ch7.htm#ExampleOneLastOrderofOperations">Example: One Last Order of Operations</A></UL><LI><A HREF="ch7.htm#Summary">Summary</A><LI><A HREF="ch7.htm#ReviewQuestions">Review Questions</A><LI><A HREF="ch7.htm#ReviewExercises">Review Exercises</A></UL><A HREF="ch8.htm"><b>Chapter 8:</b> Expressions</A><UL><LI><A HREF="ch8.htm#TypesofExpressions">Types of Expressions</A><LI><A HREF="ch8.htm#ExpressionsWithinExpressions">Expressions Within Expressions</A><LI><A HREF="ch8.htm#ComparisonOperators">Comparison Operators</A><UL><LI><A HREF="ch8.htm#ExampleUsingComparisonOperators">Example: Using Comparison Operators</A></UL><LI><A HREF="ch8.htm#LogicalOperators">Logical Operators</A><UL><LI><A HREF="ch8.htm#ExampleUsingLogicalOperators">Example: Using Logical Operators</A><LI><A HREF="ch8.htm#ExampleUsingMultipleLogicalOperators">Example: Using Multiple Logical Operators</A><LI><A HREF="ch8.htm#ExampleCombiningDifferentComparisonandLogicalOperators">Example: Combining Different Comparison and Logical Operators</A></UL><LI><A HREF="ch8.htm#WritingLogicalExpressions">Writing Logical Expressions</A>

⌨️ 快捷键说明

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