How to set scientific notation value to double variable in Java

1 Answer

0 votes
public class Example {
    public static void main(String[] args) 
    {
        double scientificd = 1.23456e4;
        
        System.out.println("double scientific notation: " + scientificd);
    }
}



  
/*
run:
  
double scientific notation: 12345.6
  
*/

 



answered Jan 8, 2016 by avibootz
edited Aug 1, 2022 by avibootz

Related questions

...