Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

abs in java

Math.abs(number);
Comment

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));    
   }
}
Comment

PREVIOUS NEXT
Code Example
Java :: How to convert long to string android studio - java 
Java :: intent android 
Java :: android:windowLightStatusBar programmatically 
Java :: java solid principles 
Java :: java string to double comma 
Java :: how to check base64 in java 
Java :: java instant from timestamp string 
Java :: flutter java.lang.RuntimeException: Unable to instantiate activity ComponentInfo 
Java :: javafx textarea size 
Java :: java string not equal 
Java :: exception in thread "main" java.lang.indexoutofboundsexception: index 1 out of bounds for length 1 
Java :: create array of particular length in java 
Java :: convert fileinputstream to string java 
Java :: glide dependency 
Java :: initialiser une arraylist 
Java :: dot operator java 
Java :: java repository sql find not in list 
Java :: generic list java 
Java :: is a and has a relationship in java 
Java :: Binary tree using linked list in Java 
Java :: indext of minimum element in an array in java 
Java :: java find if element of list in present in another list 
Java :: esponente in java 
Java :: java decompiler 
Java :: cardview implementation 
Java :: abstraction in java 
Java :: map in java 
Java :: remove duplicate from string 
Java :: quarkus maven skip test 
Java :: commenting in java 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =