abs in java
Math.abs(number);
abs in java
public class Test {
public static void main(String args[]) {
Integer a = -8;
double d = -100;
float f = -90;
System.out.println(Math.abs(a));
System.out.println(Math.abs(d));
System.out.println(Math.abs(f));
}
}
math.absolute java
float a = 123.0f;
System.out.println(Math.abs(a)); //123.0
double d = -999.3456;
System.out.println(Math.abs(d)); //999.3456
int e = -123;
System.out.println(Math.abs(g)); //123
long g = -12345678;
System.out.println(Math.abs(g)); //12345678
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us