Structured Programming: (also becomes a data flow-oriented processing method) (The smallest program unit is a function)
Principle: From top to bottom, gradually refinement, modularization.
Disadvantage: The objective world is decomposed into functions ( imitation of the objective world is not realistic enough ). A complete repair, High maintenance costs .
Object-oriented programming: (Minimum program Unit is Class) (larger than the size of the structure)
Mutual communication between objects is facilitated by mechanisms called "messages".
Object-based: The new object type cannot be produced with an existing object template. ( all objects are final type, sterilized )
For example, JavaScript can only use encapsulated objects and not allow the developer to derive new classes.
Java rejects the goto statement, but uses goto as the reserved word. (may be used in the future)
Encountered the study of UML, in the web search for some, found that many people to the UML scorn. So I also skate it over bar. Xd
Talk is cheap, show me the code. Remember Linus the teachings of the Great God.
Documentation notes: used to generate API documentation, while API documentation is primarily used to describe the functions of classes, methods, and member variables.
Javadoc:
only The comments of the source file before the class, interface, method, member variable, constructor, and inner class are processed, ignoring other places .
Only content that is decorated with public or protected is processed by default. (Use the-private option to extract the contents of the private adornment.) )
(similar to the product instruction manual, only those parts that are exposed for user use (i.e., public and protected modified content). )
Specific use:
Adding an option-encoding gbk-charset GBK can avoid garbled characters in Chinese annotation.
Javadoc options Java source file | package
Common options:
-D Dir_name: Put the generated API document into the specified directory
-windowtitle title_name: The browser window title that sets the string as the API document
-doctitle Html_code: Specifies an HTML-rich Text description page title.
-header Html_code: Specifies an HTML-rich text description header
Common parameters:
@author @version @param @return @exception @throws (≈exception)
@deprecated: Deprecated methods
[Crazy Java Handout] Understanding object-oriented