Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Explanation to improve readability of program comments one line /* . */ comments multiple lines javadoc comments Comments that in form of /** */ are used by the javadoc program to produce HTML documentation for the program Example: This is an example of special java doc comments used for \n generating an html documentation. It uses tags like: @author Florence Balagtas @version 1.2 | Chapter 2. Programming Basics ITSS Java Programming CAO Tuan-Dung, HUT Comments Explanation to improve readability of program // comments -- one line int nquest; // number of questions. /* . */ comments -- multiple lines javadoc comments Comments that in form of /** */ are used by the javadoc program to produce HTML documentation for the program Example: /** This is an example of special java doc comments used for \n generating an html documentation. It uses tags like: @author Florence Balagtas @version 1.2 */ HTTP request: HTTP method : Requesting method for Web servers such as GET method and POST method Request URI : URL information on Web server ‘form’ data : Information input by browser HTTP response: • Response message Status information which is the processing result of HTTP method • Contents type Contents type information on data to be transmitted • Request file Main information such as HTML files to be transmitted to HTTP request Javadoc Tool that pulls out the | Chapter 2. Programming Basics ITSS Java Programming CAO Tuan-Dung, HUT Comments Explanation to improve readability of program // comments -- one line int nquest; // number of questions. /* . */ comments -- multiple lines javadoc comments Comments that in form of /** */ are used by the javadoc program to produce HTML documentation for the program Example: /** This is an example of special java doc comments used for \n generating an html documentation. It uses tags like: @author Florence Balagtas @version 1.2 */ HTTP request: HTTP method : Requesting method for Web servers such as GET method and POST method Request URI : URL information on Web server ‘form’ data : Information input by browser HTTP response: • Response message Status information which is the processing result of HTTP method • Contents type Contents type information on data to be transmitted • Request file Main information such as HTML files to be transmitted to HTTP request Javadoc Tool that pulls out the class and the method etc., defined in the source file, and creates the reference manual of the program Main tag of ‘javadoc’ @see Reference destination name : Make the reference link of other classes and related packages from the class of the object . @exception Explanation of exception class name: Describe the explanation of the exception that the method of object has possibility to throw. @param Explanation of argument name @return The explanation of the return value of the method of the object is described. Hand on Lab: Javadoc Use your text editor or Eclipse to create a java program named: Circle.java The content of this file will be shown in next slides javadoc –private Circle.java javadoc -author -version Circle.java Circle.java import java.awt.*; import java.applet.*; /** * A simple circle class. * * @author Samuel A. Rebelsky * @version 1.1 of February 1999 */ public class Circle { /** The current color of the circle. */ protected Color color; /** The current diameter .