Java Documentation CommentsJava supports three kinds of annotation methods. The first two are // and/ * */, the third is called the Explanatory Note, which starts with /** and ends with * /.The description comment allows you to embed information about the program in your program. You can use the Javadoc tool software to generate information and output it to an HTML file.Explanatory notes that make it easier
= Ob.square (val); System.out.println ("squared value is" + val);}}
as follows, use the Javadoc tool to process the Squarenum.java file:$ javadoc squarenum.javaloading source file Squarenum.java ... Constructing Javadoc information ... Standard Doclet version 1.5.0_13building tree for all the packages and classes ... Generating squarenum.html ... squarenum.java:39:warning-@return tag cannot be usedIn method with void return type. Generating package-frame.html ... Generating package-summary
Package Helpdoc;/*** This is a tool class for manipulating arrays* @author Songyusheng* @version v.10*/public class arraytool{/*** This is a private structure*/Private Arraytool () {}/*** This is the way to iterate through the array, the following format is: [element 1, Element 2, Element 3, ...]* @param arr This is the array to be traversed*/public static void PrintArray (int[] arr) {for (int x=0;xif (x==arr.length-1) {System.out.println (arr[x]+ "]");}else {System.out.print (arr[x]+ ",");}}}pu
Original address: http://javatech.wang/index.PHP/archives/74/
The author is currently building a set of API service framework, considering that the client can be more convenient to invoke the API service (more convenient is to avoid the trouble to explain the parameters required by the interface and return results), so determined to generate detailed documentation for each interface. Online search for a moment, found swagger this thing, feel good, int
NOTE : The following sections are a brief coding specification, please refer to the official ORACLE documentation for more specifications . Address: http://www.oracle.com/technetwork/java/codeconventions-150003.pdf Also, use UTF-8 format to view the code to avoid garbled Chinese. As to whether the comments should be in Chinese or English, please make your own decision, according to the requirements of the c
@adddate 2015-05-31*/ Public classtest1{PrivateTest1 () {}/**take the maximum value inside the int array@paramarr passes an array of int@returnreturns an int value*/ Public Static intMaxint[] arr) { intj = arr[0]; for(inti=0;i){ if(jArr[i]) {J=Arr[i]; } } returnJ; } /**take the minimum value inside the int array@paramarr passes an array of int@returnreturns an int value*/ Public Static intXint[] arr) { intj = arr[0]; for(inti=0;i){ i
Dom|xml, preface
There are two most common ways to parse XML documents in Java: Using the event-based XML Simple API (simply API for XML), called Sax and the Document object model based on the tree and node, is called Dom. Sun offers Java API for XML parsing (JAXP) interfaces to use Sax and Dom, and with JAXP, we can use any of the JAXP-compliant XML parsers.
The Jaxp interface contains three packages:
(1)
Honghu Cloud Business Enterprise Distributed internet e-commerce platform, launched pc++app+ cloud Service cloud business platform system, including business-to-commerce, consumer-to-business, on-the-net, new retail, live e-commerce and other sub-platforms.Distributed, microservices, Cloud architecture e-commerce platform Java B2B2CTechnical SolutionsDevelopment language: Java, EEDatabase: MySQLJDK Support
Sun Download jdk--extract--javadoc file (Constuctor summary[constructor Method]+method summary[method])"Object"the object class is the root class for all Java classes. ----Clone ();----equals (Object o); ----Finalize ();----getclass ();----hashcode ();----Notify ();----Notifyall ();----toString (); "ToString Method"Public String toString (); The return value is of type string----Official documents recommend overriding this method for all classes----De
Java has been learning before, the basics are not forgotten, and these high-level languages are too similar, so those data types, or loop control flow, as well as standard equipment, and so on is just skip it.However, some important concepts will be interspersed in the introduction of the article.So, these articles are suitable for those who have a certain level of advanced object-oriented language basis for reading.We first write a student class. Its
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.