Teste

an anonymous user · May 04, 2021 · Java
import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        String test = "3.10040268E8";
        System.out.println("3.10040268E8");
    
        
        double num_double = Double.parseDouble(test);
        
        int num_int = (int)num_double;
        
        String num_string = num_int.toString();
        System.out.println(num_double);
        System.out.println(num_int);
        System.out.println(num_string);
        
    }
}

Comments

Please sign up or log in to contribute to the discussion.