Wisdom Materials
Home
About Us
Our Clients
Careers
Services
Education
Jobs
News
Business
Health
Astrology
Entertainment
RealEstate
Devotion
Contact Us
Java Language
/ Java Math
It is used to perform mathematical operations / tasks on numbers.
Program to find maximum of 2 numbers.
Output
public class MyClass
{
public static void main(String[] args)
{
System.out.println(Math.max(5, 10));
}
}
10
Program to find minimum of 2 numbers.
Output
public class MyClass {
public static void main(String[] args)
{
System.out.println(Math.min(5, 10));
}
}
5
Home
Back