Page 74 - CTS - CSA TP - Volume 2
P. 74
COMPUTER SOFTWARE APPLICATION - CITS
6 Double
• Represents a 64-bit IEEE 754 floating-point.
• Methods include: doubleValue().
Task_Double: Here’s an example program demonstrating the use of the doubleValue() method for the
Double class:
public class DoubleMethodsExample {
public static void main(String[] args) {
// Example using Double class
Double doubleValue = 2.71828;
// doubleValue()
double doubleResult = doubleValue.doubleValue();
System.out.println(“doubleValue(): “ + doubleResult);
}
}
Output:
59
CITS : IT & ITES - Computer Software Application - Exercise 90