AddNum

public class AddNum

Add Two Numbers! The AddNum program implements an application that simply adds two given integer numbers and Prints the output on the screen.

Note: Giving proper comments in your program makes it more user friendly and it is assumed as a high quality code.

Author:Zara Ali

Methods

addNum

public int addNum(int numA, int numB)

This method is used to add two integers. This is a the simplest form of a class method, just to show the usage of various javadoc Tags.

Parameters:
  • numA – This is the first paramter to addNum method
  • numB – This is the second parameter to addNum method
Returns:

int This returns sum of numA and numB.

main

public static void main(String[] args)

This is the main method which makes use of addNum method.

Parameters:
  • args – Unused.
Throws:
  • IOException – On input error.
Returns:

Nothing.

See also: IOException