WAP to typecast the following: Double to String

1 year ago
OOP Java

Compile code:

public class DoubleToString{  
    public static void main(String args[]){  
    double d = 12.3;  
    String s = String.valueOf(d);  
    System.out.println(s);  
   }

}

 

Output:

 

0
Dipti KC
Jan 8, 2023
More related questions

Questions Bank

View all Questions