Math Functions in Java in Hindi – Java Math Functions in Hindi

इस Article में हम Java Math Functions in Hindi – Math Functions in Java in Hindi के बारे में पढ़ेंगे। Java Math Function का Use Numbers पे Mathematics Operation करने के लिए किया जाता है। इन Function की मदद से Mathematics calculation को कई गुना अधिक आसान कर सकते है। Mathematics का Programing Language में Use बहुत अधिक होता है। इसलिए Java Math Function in Hindi को पढ़ना काफी महत्त्वपूर्ण है।
Math Function In Java in Hindi
Java में जितने भी Math Function है। वो सभी java.lang.math Class के अंतर्गत आते है। इसमें बहुत सारे है। ये Logarithm, Trigonometry के है। जिनसे Advance level की Calculation की जा सकती है। अब नीचे मै इन Function की List Share कर रहा हूँ।
Basic Math (Method) Functions in Hindi
Function | Explanation | ||
---|---|---|---|
math.abs() | यह दी गयी Value की Absolute Value return करती है। | ||
math.pow() | ये घातांक को Calculate करता है। | ||
math.min() | ये minimum Value को Find करता है। | ||
math.max() | ये Maximum Value को Find करता है। | ||
math.sqrt() | ये Function Number का Square (वर्गमूल ) Return करता है। | ||
math.round() | ये Floating Point Numbers को Rounded Number में Return करता है। | ||
math.ceil() | ये सबसे छोटी Integer Value को Return करता है। | ||
math.signum() | इसके द्वारा Value के Sign को Find कर सकते है। | ||
math.cbrt() | ये Number का Cube Root Return करता है। | ||
math.copysign() | ये First argument को Return करता है Second argument के (-) Sign को लेकर |
||
math.nextafter() | अगर पहला और Second Argument Same है। तो Second Argument को Return करता है। |
||
math.nextup() | ये Floating Point Value Adjacent Return करता है। | ||
math.nextdown() | ये Floating Point Value Adjacent Return करता है। | ||
math.floor() | Additionये Floating Point या Double Type की value के आस पास की Value को Return करता है। | ||
math.random() | ये 0 और 1 के बीच की Random Value को Return करता है। | ||
abs() Function in Java in Hindi
abs() Function का Use दिए गए Argument की Absolute Value को Return कराने का किया जाता है।
public class Main { public static void main(String[] args) { float a = 655.0f; float b = -85.2323f;
// abs() method taking float type as input
System.out.println(Math.abs(a));
System.out.println(Math.abs(b));
}
}
Output
655.0 85.2323
Pow() Function in Java in Hindi
public static double pow(double a, double b) Parameter: a : this parameter is the base b : this parameter is the exponent. Return : This method returns ab.
public class Main { public static void main(String[] args) { double a = 15; double b = 2; System.out.println(Math.pow(a, b));
a = 3;
b = 4;
System.out.println(Math.pow(a, b));
a = 2;
b = 6;
System.out.println(Math.pow(a, b));
}
}
225.0 81.0 64.0
min() Function in Java in Hindi
public class Main {
public static void main(String args[])
{
double a = 12.123;
double b = 12.456;
// prints the minimum of two numbers
System.out.println(Math.min(a, b));
}
}
12.123
max() Function in Java in Hindi
public class Main {
public static void main(String args[])
{
double a = 12.123;
double b = 12.456;
// prints the minimum of two numbers
System.out.println(Math.max(a, b));
}
}
12.456
sqrt() Function in Java in Hindi
public class Main {
public static void main(String args[])
{
int a = 100;
// prints the minimum of two numbers
System.out.println(Math.sqrt(a));
}
}
Output
10.0