Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
/**
* Sets the first name of ... (z. B. this Person)
*
* @param firstName first name (of this Person), may be {@code null}.
*/
public void setFirstName(String firstName) { ... }
/**
* Returns the first name (of this Person)
*
* @return String containing the first name (of this Person), might be {@code null}.
*/
public String getFirstName() { ... }
schreikrampfdie setter und getter javadocs kannst du dir automatisch generieren lassen durch tools
Code, der einfach nur generiert wird ist Platzverschwendung. Und das gleiche gilt für Kommentare.
/**
* This sets the name
* @param name the name
*/
public setName(String name){}
/**
* This returns the name
* @return the name
*/
public String getName(){}
Die Kommentare sind unsinnig. Was ist der Mehrwert dieses Kommentars?Java:/** * This sets the name * @param name the name */ public setName(String name){} /** * This returns the name * @return the name */ public String getName(){}
Du hast das Anschauungsbeispiel also verstanden.Die Kommentare sind unsinnig. Was ist der Mehrwert dieses Kommentars?
Solche Kommentare kann und sollte man weglassen.
