[Java] Types of comments and how to write them

: beginner: I pointed out every time in the source review of newcomer training, so I organized it for newcomers: beginner:

Java comment types

How to write a one-line comment

//comment

With eclipse, you can put it in and out with ctrl + /.

How to write multi-line comments

/*
*One asterisk at the beginning
* comment
*/

JavaDoc

/**
 *Class or method description
 *There are two asterisks at the beginning.
 */

A special comment with a different nature from the two mentioned above. JavaDoc comments can be documented using java commands = reference manual. Therefore, various tags can be used. It's a manual, so don't use it when writing a little explanation in the source code.

Tag example

tag Description
@param Explanation of parameters (arguments).
@return A description of the return value.
@author A description of the creator of the program.
@throw A description of the exceptions that are thrown.

Recommended Posts

[Java] Types of comments and how to write them
How to write java comments
Basics of Java development ~ How to write programs (variables and types) ~
[Java] How to output and write files!
A memo about the types of Java O/R mappers and how to select them
JDBC promises and examples of how to write
How to write comments in the schema definition file in GraphQL Java and reflect them in GraphQL and GraphQL Playground
How to write Scala from the perspective of Java
Basics of Java development ~ How to write a program (flow and conditional branching) ~
Studying Java # 6 (How to write blocks)
How to write Java variable declaration
Comparison of how to write Callback function (Java, JavaScript, Ruby)
How to write and notes when migrating from VB to JAVA
[java] Summary of how to handle char
Summary of how to write annotation arguments
[Introduction to Java] How to write a Java program
[Java] [Maven3] Summary of how to use Maven3
[Introduction to Java] Variable declarations and types
How to write offline real-time Java implementation example of F01 problem
How to write and explain Dockerfile, docker-compose
Java beginner escape boot camp Part 1 Java class structure and how to write
[Java] Note how to use RecyclerView and implementation of animated swipe processing.
[Java improvement case] How to reach the limit of self-study and beyond
Java8 / 9 Beginners: Stream API addiction points and how to deal with them
[Java] How to use FileReader class and BufferedReader class
[java] Summary of how to handle character strings
Java Development Basics ~ How to Write Programs * Exercise 1 ~
[Java] How to get and output standard input
[Java] Summary of how to abbreviate lambda expressions
How to get and study java SE8 Gold
[Java] Memo on how to write the source
[Java] How to get the authority of the folder
How to write Java String # getBytes in Kotlin?
Rails scope anti-patterns and how to eliminate them
How to access Java Private methods and fields
Notes on how to write comments in English
[Java] How to use Calendar class and Date class
How to write Rails
java --Unification of comments
How to write dockerfile
How to write docker-compose
How to write Mockito
How to write migrationfile
[Java] Variables and types
Differences between Java, C # and JavaScript (how to determine the degree of obesity)
[Java] How to get the URL of the transition source
[Java] How to use compareTo method of Date class
[Rails, JS] How to implement asynchronous display of comments
java: How to write a generic type list [Note]
[Java] How to get the maximum value of HashMap
Java memory management and how to read GC Viewer
As of April 2018 How to get Java 8 on Mac
Summary of Java communication API (1) How to use Socket
I summarized the types and basics of Java exceptions
Summary of Java communication API (3) How to use SocketChannel
How to convert A to a and a to A using AND and OR in Java
Summary of Java communication API (2) How to use HttpUrlConnection
Summary of how to implement default arguments in Java
How to write modern Java. Immutable Java, consider Null safety.
Common problems with WSL and how to deal with them
Equivalence comparison of Java wrapper classes and primitive types