List of usage examples for java.lang Double Double
@Deprecated(since = "9") public Double(String s) throws NumberFormatException
From source file:Main.java
public static void main(String[] args) { Double double1 = new Double(0.0 / 0.0); System.out.println(double1.isNaN()); }
From source file:Main.java
public static void main(String[] args) { Double double1 = new Double(1 / 0.0); System.out.println(Double.isInfinite(double1)); }
From source file:Main.java
public static void main(String[] args) { Double double1 = new Double(1 / 0.0); System.out.println(double1.isInfinite()); }
From source file:Main.java
public static void main(String[] args) { Double double1 = new Double(1.1); Double double2 = new Double("1.2"); System.out.println(Double.compare(double1, double2)); }
From source file:Main.java
public static void main(String[] args) { Double double1 = new Double(1.1); Double double2 = new Double("1.2"); System.out.println(double1.compareTo(double2)); }
From source file:Main.java
public static void main(String[] args) { Double d1 = new Double(+0.0); System.out.println(d1.doubleValue()); Double d2 = new Double(-0.0); System.out.println(d2.doubleValue()); System.out.println(d1.equals(d2)); System.out.println(+0.0 == -0.0); }
From source file:Main.java
public static void main(String[] args) { Double doubleObject = new Double("10.01"); long l = doubleObject.longValue(); System.out.println("long:" + l); }
From source file:Main.java
public static void main(String[] args) { Double doubleObject = new Double("10.01"); byte b = doubleObject.byteValue(); System.out.println("byte:" + b); }
From source file:Main.java
public static void main(String[] args) { Double doubleObject = new Double("10.01"); int i = doubleObject.intValue(); System.out.println("int:" + i); }
From source file:Main.java
public static void main(String[] args) { Double doubleObject = new Double("10.01"); short s = doubleObject.shortValue(); System.out.println("short:" + s); }