Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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));    
   }
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #abs #java
ADD COMMENT
Topic
Name
6+6 =