Is it a good practice to write comments for widely known methods like equals, compareTo etc.?
Consider the below code.
/**
* This method compares the equality of the current object
with the object of same type
*/
@Override
public boolean equals(Object obj) {
//code for equals
}
My company madates to enter comments like the above.Is the above Javadoc comment required.? Is it not obvious and well understood thatwhat the equals method and the likes (compare,compareTo) etc does .?
What are your suggestions?