String … and Generating Javadocs

In java we can pass some arguments in methods. Sometimes we want to pass the array of objects. So if you see writeText(String … text) is actually nothing but array of Strings. It’s same as writeText(String[] text).

To easily Generate javadocs in Intelij Idea you can use this shorcut.

type /** then press enter. This applies for the methods. Later you can add more details to that javadoc

ex.:

/**

public String addText(String[] text){

return ‘abc’;}

becomes

/**
 *
 * @param text
 * @return 
 */

public String addText(String[] text){

return ‘abc’;}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s