Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
double から小数点を削除したいですか?
例: 234.567 は 234567 になります。
メソッドを使用してから、空白文字 ( )String.valueOfに置き換えることができます。.""
String.valueOf
.
""
String s = String.valueOf(234.567).replace(".","");
簡単な方法を使用してください。int にキャストします。:P
x = (フロート) 5.12; int a = (int) x; System.out.println(a);