Knowledge Point One (Javadoc):
when using Javadoc, pay special attention to choosing encoding and CharSet as Utf-8, otherwise the generated Javadoc will be garbled, command: javadoc-encoding utf-8-charset utf-8 *.java
Appendix (Javadoc Mark)
@author Author identification
@version version number
@param parameters
@return Description
@deprecated Expired
@throws exception
@see References
@since description (What is the API after what version of the program Development Support)
@link linked to a specific member of the document (in use)
The value of a constant is included in the label @value the constant is commented
There are also @serial, @serialField, @serialData, {@docRoot}, {@inheritDoc}, {@literal}, {@code} {@value arg} tags that are not commonly used
Sample program:
* @author RJH
* @version v1.0
* @param args The<code>args</code>will be print
* @deprecated expires from the next version
* @exception Exception a exception will{@link Test4} be throw
* @see #toString ()
* @serialData 2016/6/02
Reference Address: http://baike.baidu.com/view/975838.htm
Knowledge Point Two (bitwise operators):
Need to know 1101 = (1*2^0) + (0*2^1) + (1*2^2) + (1*2^3) = 13, abstract out the mathematical expression as follows:
n is the number on the X-bit (the default is from low to high), the corresponding decimal number on each of the common expressions is n*2^x, and the final sum is the answer
& Bitwise AND, if one of the two is 0 then 0 otherwise 1, example:
1101 (Decimal)
0110 6 (Decimal)
Bitwise AND for 00100 4 (Decimal)
| Bitwise OR, if two input bits are 0 The case will produce a 0, example:
1101 (Decimal)
0110 6 (Decimal)
Bitwise OR for 1111 (decimal)
^ Bitwise XOR (XOR) If two input bits are opposite to 1, example :
1101 (Decimal)
0110 6 (Decimal)
Bitwise XOR or 1011 (decimal)
~ bitwise Non, is a unary operator, only for a binary data function, take the corresponding bits above, example:
1101 (Decimal)
Bitwise non-0010 2 (decimal)
knowledge point three (equals)
The default Equals method compares the referenced handle, while some other classes compare the object content because the Equals method is implemented.
The Equals method in object is:
public boolean equals (Object obj) { return (this = = obj);}
Can be very intuitive to see this is to use the = = number to determine whether the equality, that is, the comparison is the value.
Supplementary example: char C = (char) (Math.random () * + ' a '); C of the output is a A-Z with any English letter, at which point the + number calculates the double and int values (the acii corresponding to a)
Thinking in Java Knowledge (i)