-6
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int i=scan.nextInt();
// double d=scan.nextDouble();
// Write your code here.
Double d = 0.0;
try {
d = Double.parseDouble(scan.nextLine());
} catch (NumberFormatException e) {
e.printStackTrace();
}
String s=scan.nextLine();
System.out.println("String: " + s);
System.out.println("Double: " + d);
System.out.println("Int: " + i);
}
这将是巨大的,如果你[格式化你的代码首先](HTTPS:/ /stackoverflow.com/posts/44539167/edit) –
我是新的。不知道如何格式化代码。亲爱的 – Aditya
并说出发生了什么事情与您预期会发生什么。 –