Java C2. Programming Basics

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 | 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 */ 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 */ 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: The content of this file will be shown in next slides javadoc –private javadoc -author -version import .*; import .*; /** * A simple circle class. * * @author Samuel A. Rebelsky * @version of February 1999 */ public class Circle { /** The current color of the circle. */ protected Color color; /** The current diameter .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.