Math.abs Method In Java Code Example


Example: 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));        } }

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable