Online Java Compiler By
JavaTpoint.com
public class DoubleByteValueExample2{ public static void main(String[] args) { Double doubleValue1= new Double("66.12"); Double doubleValue2=new Double("22"); Double c= doubleValue1+doubleValue2; System.out.println("Sum = "+c); //method is returning the value of Double as byte byte byteValue1=doubleValue1.byteValue(); byte byteValue2=doubleValue2.byteValue(); double d= byteValue1+byteValue2; System.out.println("Sum = " +d); } }
Output