-3
我想打一個用戶輸入與圓點分隔像(11.56.98) 後,要使用整數x = 11 Y = 56,Z = 98如何在java中使用單獨的兩個整數?
`Scanner s = new Scanner(System.in);
System.out.print("Enter Your number like (36.52.10): ");
int x = s.nextInt();
int y = s.nextInt();
int z = s.nextInt();`
現在怎麼usedelimiter將變爲空白,以點以及如何再次返回空白
取值的字符串,然後除以值按烏爾要求 – Kick
你能不能請澄清你想要做什麼?你的最後一句話很難閱讀,並且(至少對我而言)是不可能理解的。 – Mischa
只需使用'string.split()'https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split(java.lang.String) – Achilles