外文翻译.docx

基于SSH的学生作业管理系统的设计与实现含开题及源代码

收藏

压缩包内文档预览:
预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图
编号:197244259    类型:共享资源    大小:30.11MB    格式:ZIP    上传时间:2022-02-24 上传人:QQ14****9609 IP属地:陕西
45
积分
关 键 词:
文本
资源描述:
基于SSH的学生作业管理系统的设计与实现含开题及源代码,文本
内容简介:
1 外文资料翻译译文你的第一个Java 程序最后,这里有第一个完整的程序。它以通过打印字符串开始,接下来就是日期,使用的是来自Java的标准库的日期类。/ HelloDate.java import java.util.*; public class HelloDate public static void main(String args) System.out.println(Hello, its: ); System.out.println(new Date(); 在每一个程序文件的开头,你必须放置一个import 语句,去引用那些额外的类当然是你需要的文件代码。请注意我说它们是“额外”的。那是因为有一个会自动导入每个Java 文件的特殊类库:java.lang。启动您的Web 浏览器,查看由Sun 提供的用户文档(如果尚未从 下载,或用其他方式安装了Java 文档,请立即下载)。在packages.html 文件里,可找到Java 配套提供的所有类库名称。请选择其中的java.lang。在“Class Index”下面,可找到属于那个库的全部类的列表。由于java.lang 默认进入每个Java 代码文件,所以这些类在任何时候都可直接使用。在这个列表里,可发现System 和Runtime,我们在Property.java 里用到了它们。java.lang 里没有列出Date 类,所以必须导入另一个类库才能使用它。如果不清楚一个特定的类在哪个类库里,或者想检视所有的类,可在Java 用户文档里选择“Class Hierarchy”(类分级结构)。在Web 浏览器中,虽然要花不短的时间来建立这个结构,但可清楚找到与Java 配套提供的每一个类。随后,可用浏览器的“查找”(Find)功能搜索关键字“Date”。经这样处理后,可发现我们的搜索目标以java.util.Date 的形式列出。我们终于知道它位于util 库里,所以必须导入java.util.*;否则便不能使用Date。观察packages.html 文档最开头的部分,请选择java.lang,再选System,这时可看到System 类有几个字段。若选择out,就可知道它是一个static PrintStream 对象。由于它是“静态”的,所以你不需要用new关键字创建任何东西。因为out 对象一直都在,所以你可以直接使用它。我们能对这个out 对象做的事情由它的类型决定:PrintStream。PrintStream 在说明文字中以一个超链接的形式列出,这一点做得非常方便。所以假若单击那个链接,就可看到能够为PrintStream 调用的所有方法。方法的数量不少,本书后面会详细介绍。就目前来说,我们感兴趣的只有println(),它的意思是“把我给你的东西打印到控制台,并用一个新行结束”。所以在任何Java 程序中,一旦要把某些内容打印到控制台,就可条件反射地写上System.out.println(A String of things)。 类名与文件是一样的。若像现在这样创建一个独立的程序,文件中的一个类必须与文件同名(如果没这样做,编译器会及时作出反应)。类里必须包含一个名为main()的方法,形式如下: public static void main(String args) 其中,关键字“public”意味着方法可由外部世界调用(在Access Control 这一章节里面会详细解释)。main()的自变量是包含了String 对象的一个数组。args 不会在本程序中用到,但需要在这个地方列出,因为它们保存了在命令行调用的自变量。程序的第一行非常有趣: System.out.println(new Date();请观察它的自变量:创建Date 对象唯一的目的就是将它的值发送给println()。一旦这个语句执行完毕,Date 就不再需要。随之而来的“垃圾收集器”会发现这一情况,并在任何可能的时候将其回收。我们没太大的必要关心“清除”的细节。当你看到从 JDK文档中,你会发现系统有很多其他的方法可以产生有趣的效果(Java的最强大的资产之一是它的大套标准库)。 例如:/: object/ShowProperties.java public class ShowProperties public static void main(String args) System.getProperties().list(System.out); System.out.println(System.getProperty(); System.out.println( System.getProperty(java.library.path); /:在第一行的main()显示所有的从系统中正在运行的程序“属性”,所以它给你的环境信息。名单()方法将结果发送给它的参数下,System.out。你会在书中,你可以在其他地方将结果发送到文件,例如在后面看到。您也可以要求一个特定的属性,在这种情况下,用户名和的java.library.path。 (在开始和结束时的不同寻常的意见将在稍后说明一点。)编译和运行要编译并运行此程序,以及所有在这本书中的其他程序,您必须首先有一个Java编程环境。有一些第三方的开发环境,但在这本书中,我会假设你使用的是Java开发工具包(JDK)来自Sun,这是免费的。如果您使用的是另一种开发系统,你需要查看的文档中该系统以确定如何编译和运行程序。连接互联网,并登录。在那里,你可以找到的信息和链接,将引导您完成下载和安装为您的特定平台的JDK。一旦JDK安装,并且已经设置了计算机的路径信息,这样它会寻找javac和java,下载并解压的源代码本书(你可以在www.MindV找到它)。这将为这本书中每一章创建一个子目录。移动到以为“对象”命名的子目录里,类型是:javac HelloDate.java 这个命令应该不会产生反应。如果你得到任何形式的错误信息,那说明你还没有安装JDK正确,你需要调查这些问题。在另一方面,如果你只是想让你的命令提示符返回,你可以键入:java HelloDate 你会得到的消息和日期作为输出。这是你可以用它来在这本书中编译和运行的每个程序的过程。但是,你会看到,在每一个章节里面这本书的源代码也有一个名为build.xml文件,这包含了“Ant”的命令为章节自动建立的文件。构建文件和Ant(包括在哪里可以下载)在补充更详细地描述你会发现http:/MindV/Books/BetterJava,但一旦你已经安装了Ant(从 /ant),你可以只输入“ant”在命令提示符下编译和运行在每章的程序。如果你还没有安装Ant,你可以手动输入的javac和java命令。注释和嵌入文件在Java中的注释类型中有两种。首先是由C +继承了传统的C风格的注释。这些注释以/*开始,可以注释许多行,直到*/才会结束。需要注意的是很多程序员将用*注释每一行的开头,所以你会经常看到:/* This is a comment * that continues * across lines */ 但是请记住,在/*和*/之间的任何东西都会被忽略,所以这里没有区别:/* This is a comment that continues across lines */ 注释的第二种形式来自于C +。它是单行注释,它开始于一个/并且一直到这一行的结尾。由于这种注释的便捷性,这种类型的注释是方便和常用的。你并不需要在键盘上找到/和*(相反,你只需按相同的键两次),而且你也不需要关闭评论。所以,你会经常看到:/ This is a one-line comment 注释文档可能记录代码最大的问题已经变成维持该文档了。如果文档和代码是分开的,那么每一次你改变代码的时候还要改变文档,这是十分乏味的。解决的办法似乎很简单:把代码和文档链接起来。要做到这一点,最简单的办法就是把一切都放在同一个文件。然而,要完成这样的图片,你需要一个特殊的注释语法去标记这些文档,还有一个工具来提取这些意见,并把他们以一个有用的形式呈现。这就是Java所做的事情。提取注释的工具被称为Javadoc,它是JDK安装的一部分。它从Java编译器中采用的一些技术来查找你在自己编写程序中写过的特殊注释标记。它不仅提取标记这些标记中的信息,也翻出邻接注释的类名或方法名称。这样你就可以逃脱一些繁琐工作而专注编写程序文档。Javadoc的输出是一个HTML文件,您可以在Web浏览器中查看到它的样子。因此,Javadoc允许你可以创建和维护一个单一的源文件,并自动生成有用的文档。由于Javadoc,你有一个简单的标准来创建文档,所以你可以期待,甚至要求文件带有所有Java库。此外,你可以写你自己的Javadoc处理程序,叫做doclet,如果你想通过Javadoc对信息进行特殊操作(例如,产生输出不同的格式)。所以在网址http:/MindV/Books/BetterJava中有一些Doclets的补充介绍。接下来只是一个介绍和Javadoc基础知识的概述。完整描述可以在JDK文档中找到。当您打开的文档,在“tooldocs”子目录中寻找(或点开“tooldocs”链接查找)。句法所有的Javadoc命令只出现在/*的注释里面。该注释通常以* /结束。有两种主要的方式来使用的Javadoc:嵌入HTML或使用独立文档标签开头的“”,并放置在注释行的开始命令“文档标签”。(一般以*开头,但通常被忽略。)内联文档标签可以出现在Javadoc注释的任何地方,也以“”开头,但被大括号包围。有三种“类型”的注释文档,它们对应于位于注释后面的元素:类,字段或方法。也就是说,一个类评论出现在一个类的定义前面,一个字段注释出现眼前的一个字段的定义的前面,和一个方法评论出现在定义方法的前面。举个简单的例子:/: object/Documentation1.java /* A class comment */ public class Documentation1 /* A field comment */ public int i; /* A method comment */ public void f() /: 需要注意的是Javadoc将处理注释文档仅用于public和protected成员。Private的注解和包访问成员(请参阅Access Control 这一章节)将被忽略,你会看到没有输出。(不过,你可以使用private标记,当然也包括private成员。)这是有道理的,因为只有public和protected成员可在文件之外获得,这是客户程序员的角度之外。对于上述代码的输出是一个HTML文件,一个具有相同的标准格式作为Java文档其余部分的文件,因此用户可以轻松的格式化,并且可以轻松地浏览你的类。进入前面的代码是很值得的,通过Javadoc发送它,并查看生成结果的HTML文件。嵌入式HTMLJavadoc通过HTML命令来生成的HTML文档。这允许你的充分利用HTML;然而,主要的目的是为了让你格式化代码,如:/: object/Documentation2.java /* * * System.out.println(new Date(); * */ /您还可以使用HTML就像任何其他Web文档用你自己的描述来格式的普通文本:/: object/Documentation3.java /* * You can even insert a list: * * Item one * Item two * Item three * */ /请注意在文档注释中,星号在一行的开头是被Javadoc忽略的,随着空格。 Javadoc将一切重新格式化,使其符合标准文档的外观。不要使用标题,如和来嵌入HTML,因为Javadoc会加上自己的标题,而你将影响他们。所有类型的注释文档-类,字段和方法,能够支持嵌入式HTML。一些示例代码下面是一些可用于代码文档的Javadoc标签。在试图做任何严重的使用Javadoc之前,您应该咨询JDK文档参考Javadoc,了解所有可以在Javadoc中使用的不同方法。see 这个标签可以让你引用其他类的文档。 Javadoc将生成的HTML超链接到其他文档的see标签。的形式是:see classname see fully-qualified-classname see fully-qualified-classname#method-name 每添加一个超链接“另见”项生成的文档。 Javadoc将不检查你给它,以确保它们是有效的超链接。link package.class#member label 非常相似see,但它可以通过内联用,并使用标签作为超链接文本,而不是“另见。”docRoot 生产的相对路径文档根目录。在文档树页中有用的明确的超链接。inheritDoc 继承这个类的最近基类的文档到当前文档注释。version格式如下: version version-information 其中,“版本信息”代表任何适合作为版本说明的资料。若在javadoc 命令行使用了“-version”标记,就会从生成的HTML 文档里提取出版本信息。author格式如下:author author-information 其中,“作者信息”包括您的姓名、电子函件地址或者其他任何适宜的资料。若在javadoc 命令行使用了“-author”标记,就会专门从生成的HTML 文档里提取出作者信息。可为一系列作者使用多个这样的标记,但它们必须连续放置。全部作者信息会一起存入最终HTML 代码的单独一个段落里。since 这个标签可以让你以表明这段代码中开始使用特定功能的版本。你会看到它出现在HTML Java文档中说明哪些版本的JDK使用。 param这是用于方法的文档,并具有以下形式:param parameter-name description 其中,“参数名”是指参数列表内的标识符,而“说明”代表一些可延续到后续行内的说明文字。一旦遇到一个新文档标记,就认为前一个说明结束。可使用任意数量的说明,每个参数一个。return这是用于方法的文档,而且看起来是这样的: return description 其中,“说明”是指返回值的含义。它可延续到后面的行内。throws 异常将在错误处理异常这一章被证明。简单地说,如果一个方法失败,它们是可以被“抛出”的方法。尽管当你调用一个方法,只有一个例外对象可以出现,一个特定的方法可能会产生许多不同类型的异常,所有这些都需要描述。所以,形式异常标签:throws fully-qualified-class-name description 在完全合格的类名给出了某个地方定义的异常类的一个明确的名称和说明(可延续到后续行),告诉你为什么这种特殊类型的异常可以从方法调用中出现。deprecated这是Java 1.1 的新特性。该标记用于指出一些旧功能已由改进过的新功能取代。该标记的作用是建议用户不必再使用一种特定的功能,因为未来改版时可能摒弃这一功能。若将一个方法标记为deprecated,则使用该方法时会收到编译器的警告。文档示例下面还是我们的第一个Java 程序,只不过已加入了完整的文档注释: /: object/HelloDate.java import java.util.*; /* The first Thinking in Java example program. * Displays a string and todays date. * author Bruce Eckel * author www.MindV * version 4.0 */ public class HelloDate /* Entry point to class & application. * param args array of string arguments * throws exceptions No exceptions thrown */ public static void main(String args) System.out.println(Hello, its: ); System.out.println(new Date(); /* Output: (55% match) Hello, its: Wed Oct 05 14:39:36 MDT 2005 */: 该文件的第一行使用我自己的方法“/:”对于包含源文件名的注释行特殊的标记。该行中包含的路径信息的文件(对象指示本章)和紧跟其后的文件名。最后一行也是以注释结尾,这个(/:)表示源代码列表的结束,这使得它被检查编译之后,能够被自动更新到这本书的文本。这个/*Output:标签指示了输出的开始将由此文件生成。在这种形式中,它可以被自动地进行测试,以验证其准确性。在这种情况下,(55匹配)指示去测试系统,该系统的输出将是从一个运行相当不同的下一个,所以应该只期望与这里示出的输出55的相关性。大多数的例子在这本书产生输出将包含在此评论的形式输出,所以你可以看到输出,并知道它是正确的。编码样式一个非正式的Java 编程标准是大写一个类名的首字母。若类名由几个单词构成,那么把它们紧靠到一起(也就是说,不要用下划线来分隔名字)。此外,每个嵌入单词的首字母都采用大写形式。例如: class AllTheColorsOfTheRainbow / .对于其他几乎所有内容:方法、字段(成员变量)以及对象句柄名称,可接受的样式与类样式差不多,只是标识符的第一个字母采用小写。例如:class AllTheColorsOfTheRainbow int anIntegerRepresentingColors;void changeTheHueOfTheColor(int newHue) / ./ .当然,要注意用户也必须键入所有这些长名字,而且不能输错。总结通过本章的学习,大家已接触了足够多的Java 编程知识,已知道如何自行编写一个简单的程序。此外,对语言的总体情况以及一些基本思想也有了一定程度的认识。然而,本章所有例子的模式都是单线形式的“这样做,再那样做,然后再做另一些事情”。接下来的两章将介绍在Java编程中使用的基本操作,然后向您展示如何控制程序的流程。2.外文原文Your first Java programFinally, heres the first complete program. It starts by printing a string, an d then the date, using the Date class from the Java standard library. / HelloDate.java import java.util.*; public class HelloDate public static void main(String args) System.out.println(Hello, its: ); System.out.println(new Date(); At the beginning of each program file, you must place any necessary import statements to bring in extra classes youll need for the code in that file. Note that I say “extra”. Thats because theres a certain library of classes that are automatically brought into every Java file: java.lang. Start up your Web browser and look at the documentation from Sun. (If you havent downloaded the JDK documentation from , do so now.5 Note that this documentation doesnt come packed with the JDK; you must do a separate download to get it.) If you look at the list of the packages, youll see all the different class libraries that come with Java. Select java.lang. This will bring up a list of all the classes that are part of that library. Since java.lang is implicitly included in every Java code file, these classes are automatically available. Theres no Date class listed in java.lang, which means you must import another library to use that. If you dont know the library where a particular class is, or if you want to see all of the classes, you can select “Tree” in the Java documentation. Now you can find every single class that comes with Java. Then you can use the browsers “find” function to find Date. When you do youll see it listed as java.util.Date, which lets you know that its in the util library and that you must import java.util.* in order to use Date. If you go back to the beginning, select java.lang and then System, youll see that the System class has several fields, and if you select out, youll discover that its a static PrintStream object. Since its static, you dont need to create anything with new. The out object is always there, and you can just use it. What you can do with this out object is determined by its type: PrintStream. Conveniently, PrintStream is shown in the description as a hyperlink, so if you click on that, youll see a list of all the methods you can call for PrintStream. There are quite a few, and these will be covered later in the book. For now all were interested in is println( ), which in effect means “Print what Im giving you out to the console and end with a newline.” Thus, in any Java program you write you can write something like this: System.out.println(A String of things); whenever you want to display information to the console. The name of the class is the same as the name of the file. When youre creating a standalone program such as this one, one of the classes in the file must have the same name as the file. (The compiler complains if you dont do this.) That class must contain a method called main( ) with this signature and return type: public static void main(String args) The public keyword means that the method is available to the outside world (described in detail in the Access Control chapter). The argument to main( ) is an array of String objects. The args wont be used in this program, but the Java compiler insists that they be there because they hold the arguments from the command line. The line that prints the date is quite interesting: System.out.println(new Date(); The argument is a Date object that is being created just to send its value (which is automatically converted to a String) to println( ). As soon as this statement is finished, that Date is unnecessary, and the garbage collector can come along and get it anytime. We dont need to worry about cleaning it up. When you look at the JDK documentation from , you will see that System has many other methods that allow you to produce interesting effects (one of Javas most powerful assets is its large set of standard libraries). For example: /: object/ShowProperties.java public class ShowProperties public static void main(String args) System.getProperties().list(System.out); System.out.println(System.getProperty(); System.out.println( System.getProperty(java.library.path); /: The first line in main( ) displays all of the “properties” from the system where you are running the program, so it gives you environment information. The list( ) method sends the results to its argument, System.out. You will see later in the book that you can send the results elsewhere, to a file, for example. You can also ask for a specific propertyin this case, the user name and java.library.path. (The unusual comments at the beginning and end will be explained a little later.) Compiling and running To compile and run this program, and all the other programs in this book, you must first have a Java programming environment. There are a number of third-party development environments, but in this book I will assume that you are using the Java Developers Kit (JDK) from Sun, which is free. If you are using another development system,6 you will need to look in the documentation for that system to determine how to compile and run programs. Get on the Internet and go to . There you will find information and links that will lead you through the process of downloading and installing the JDK for your particular platform. Once the JDK is installed, and youve set up your computers path information so that it will find javac and java, download and unpack the source code for this book (you can find it at www.MindV). This will create a subdirectory for each chapter in this book. Move to the subdirectory named objects and type: javac HelloDate.java This command should produce no response. If you get any kind of an error message, it means you havent installed the JDK properly and you need to investigate those problems. On the other hand, if you just get your command prompt back, you can type: java HelloDate and youll get the message and the date as output. This is the process you can use to compile and run each of the programs in this book. However, you will see that the source code for this book also has a file called build.xml in each chapter, and this contains “Ant” commands for automatically building the files for that chapter. Buildfiles and Ant (including where to download it) are described more fully in the supplement you will find at http:/MindV/Books/BetterJava, but once you have Ant installed (from /ant) you can just type ant at the command prompt to compile and run the programs in each chapter. If you havent installed Ant yet, you can just type the javac and java commands by hand. Comments and embedded documentation There are two types of comments in Java. The first is the traditional C-style comment that was inherited by C+. These comments begin with a /* and continue, possibly across many lines, until a */. Note that many programmers will begin each line of a continued comment with a *, so youll often see: /* This is a comment * that continues * across lines */ Remember, however, that everything inside the /* and */ is ignored, so theres no difference in saying: /* This is a comment that continues across lines */ The second form of comment comes from C+. It is the single-line comment, which starts with a / and continues until the end of the line. This type of comment is convenient and commonly used because its easy. You dont need to hunt on the keyboard to find / and then * (instead, you just press the same key twice), and you dont need to close the comment. So you will often see: / This is a one-line comment Comment documentation Possibly the biggest problem with documenting code has been maintaining that documentation. If the documentation and the code are separate, it becomes tedious to change the documentation every time you change the code. The solution seems simple: Link the code to the documentation. The easiest way to do this is to put everything in the same file. To complete the picture, however, you need a special comment syntax to mark the documentation and a tool to extract those comments and put them in a useful form. This is what Java has done. The tool to extract the comments is called Javadoc, and it is part of the JDK installation. It uses some of the technology from the Java compiler to look for special comment tags that you put in your programs. It not only extracts the information marked by these tags, but it also pulls out the class name or method name that adjoins the comment. This way you can get away with the minimal amount of work to generate decent program documentation. The output of Javadoc is an HTML file that you can view with your Web browser. Thus, Javadoc allows you to create and maintain a single source file and automatically generate useful documentation. Because of Javadoc, you have a straightforward standard for creating documentation, so you can expect or even demand documentation with all Java libraries. In addition, you can write your own Javadoc handlers, called doclets, if you want to perform special operations on the information processed by Javadoc (to produce output in a different format, for example). Doclets are introduced in the supplement at http:/MindV/Books/BetterJava. What follows is only an introduction and overview of the basics of Javadoc. A thorough description can be found in the JDK documentation. When you unpack the documentation, look in the “tooldocs” subdirectory (or follow the “tooldocs” link). Syntax All of the Javadoc commands occur only within /* comments. The comments end with */ as usual. There are two primary ways to use Javadoc: Embed HTML or use “doc tags.” Standalone doc tags are commands that start with an and are placed at the beginning of a comment line. (A leading *, however, is ignored.) Inline doc tags can appear anywhere within a Javadoc comment and also start with an but are surrounded by curly braces. There are three “types” of comment documentation, which correspond to the element the comment precedes: class, field, or method. That is, a class comment appears right before the definition of a class, a field comment appears right in front of the definition of a field, and a method comment appears right in front of the definition of a method. As a simple example: /: object/Documentation1.java /* A class comment */ public class Documentation1 /* A field comment */ public int i; /* A method comment */ public void f() /: Note that Javadoc will process comment documentation for only public and protected members. Comments for private and package-access members (see the Access Control chapter) are ignored, and youll see no output. (However, you can use the -private flag to include private members as well.) This makes sense, since only public and protected members are available outside the file, which is the client programmers perspective. The output for the preceding code is an HTML file that has the same standard format as all the rest of the Java documentation, so users will be comfortable with the format and can easily navigate your classes. Its worth entering the preceding code, sending it through Javadoc, and viewing the resulting HTML file to see the results. Embedded HTML Javadoc passes HTML commands through to the generated HTML document. This allows you full use of HTML; however, the primary motive is to let you format code, such as: /: object/Documentation2.java /* * * System.out.println(new Date(); * */ /: You can also use HTML just as you would in any other Web document to format the regular text in your descriptions: /: object/Documentation3.java /* * You can even insert a list: * * Item one * Item two * Item three * */ /: Note that within the documentation comment, asterisks at the beginning of a line are thrown away by Javadoc, along with leading spaces. Javadoc reformats everything so that it conforms to the standard documentation appearance. Dont use headings such as or as embedded HTML, because Javadoc inserts its own headings and yours will interfere with them. All types of comment documentationclass, field, and methodcan support embedded HTML. Some example tags Here are some of the Javadoc tags available for code documentation. Before trying to do anything serious using Javadoc, you should consult the Javadoc reference in the JDK documentation to learn all the different ways that you can use Javadoc. see This tag allows you to refer to the documentation in other classes. Javadoc will generate HTML with the see tags hyperlinked to the other documentation. The forms are: see classname see fully-qualified-classname see fully-qualified-classname#method-name Each one adds a hyperlinked “See Also” entry to the generated documentation. Javadoc will not check the hyperlinks you give it to make sure they are valid. link package.class#member label Very similar to see, except that it can be used inline and uses the label as the hyperlink text rather than “See Also.” docRoot Produces the relative path to the documentation root directory. Useful for explicit hyperlinking to pages in the documentation tree. inheritDoc Inherits the documentation from the nearest base class of this class into the current doc comment. version This is of the form: version version-information in which version-information is any significant information you see fit to include. When the - version flag is placed on the Javadoc command line, the version information will be called out specially in the generated HTML documentation. author This is of the form: author author-information in which author-information is, presumably, your name, but it could also include your email address or any other appropriate information. When the -author flag is placed on the Javadoc command line, the author information will be called out specially in the generated HTML documentation. You can have multiple author tags for a list of authors, but they must be placed consecutively. All the author information will be lumped together into a single paragraph in the generated HTML. since This tag allows you to indicate the version of this code that began using a particular feature. Youll see it appearing in the HTML Java documentation to indicate what version of the JDK is used. param This is used for method documentation, and is of the form: param parameter-name description in which parameter-name is the identifier in the method parameter list, and description is text that can continue on subsequent lines. The description is considered finished when a new documentation tag is encountered. You can have any number of these, presumably one for each parameter. return This is used for method documentation, and looks like this: return description in which description gives you the meaning of the return value. It can continue on subsequent lines. throws Exceptions will be demonstrated in the Error Handling with Exceptions chapter. Briefly, they are objects that can be “thrown” out of a method if that method fails. Although only one exception object can emerge when you call a method, a particular method might produce any number of different types of exceptions, all of which need descriptions. So the form for the exception tag is: throws fully-qualified-class-name description in which fully-qualified-class-name gives an unambiguous name of an exception class thats defined somewhere, and description (which can continue on subsequent lines) tells you why this particular type of exception can emerge from the method call. deprecated This is used to indicate features that were superseded by an improved feature. The deprecated tag is a suggestion that you no longer use this particular feature, since sometime in the future it is likely to be removed. A method that is marked deprecated causes the compiler to issue a warning if it is used. In Java SE5, the deprecated Javadoc tag has been superseded by the Deprecated annotation (youll learn about these in the Annotations chapter). Documentation example Here is the first Java program again, this time with documentation comments added: /: object/HelloDate.java import java.util.*; /* The first Thinking in Java e
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
提示  人人文库网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:基于SSH的学生作业管理系统的设计与实现含开题及源代码
链接地址:https://www.renrendoc.com/paper/197244259.html

官方联系方式

2:不支持迅雷下载,请使用浏览器下载   
3:不支持QQ浏览器下载,请用其他浏览器   
4:下载后的文档和图纸-无水印   
5:文档经过压缩,下载后原文更清晰   
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

网站客服QQ:2881952447     

copyright@ 2020-2025  renrendoc.com 人人文库版权所有   联系电话:400-852-1180

备案号:蜀ICP备2022000484号-2       经营许可证: 川B2-20220663       公网安备川公网安备: 51019002004831号

本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知人人文库网,我们立即给予删除!