Java examples for Language Basics:Java Doc
Use Javadoc to place comments before any class, method, or field that you want to document.
To begin such a comment, write the characters /**.
Then begin each subsequent line with an asterisk (*).
Lastly, close the comment with the characters */ on a line by themselves at the end.
import java.math.BigInteger; public class Main { /** /*w w w .ja v a 2 s . c o m*/ * Accepts an unlimited number of values and * returns the sum. * * @param nums Must be an array of BigInteger values. * @return Sum of all numbers in the array. */ public static BigInteger addNumbers(BigInteger[] nums) { BigInteger result = new BigInteger("0"); for (BigInteger num:nums){ result = result.add(num); } return result; } /** * Test the addNumbers method. * @param args not used */ public static void main (String[] args) { BigInteger[] someValues = {BigInteger.TEN, BigInteger.ONE}; System.out.println(addNumbers(someValues)); } }