Mathematical Library Merthods
1. What is a mMethod?
Ans:- A method is a program module (part of a program) which is used at different instances. Some are
defined by the users itself while some are already defined by the system developers.
2. The methods which are created by he system developers are called as library methods.
3. How can we write a mathematical method in a Java program?
Ans:- A;ll mathematical functions are included in a class called as “Mtah”. Therefore in order to use to
mathematical method in Java, me need to tag along with the function is added as- Math.<Method
name>.
4. write about the different types of libraruy methods in Jva.
Ans:-
a. [Link]()- This function returns the minimum of two numbers. The return value depends upon the
values used as the arguments of the function (i.e., if the arguments are integer numbers, the result will
also be integer numbers (inty data type) and so on.
Syntax- <Return data type ><variable>= Function argument(argument 1, argument 2);
Ex:- int n= [Link](4,6);
It will return an integer type value for n as 4, which is minimum of 4 and 6.
b. [Link]