2014-04-03 20 views

回答

0

這就是:

Long.toBinaryString(11728322732L); 

其實,11728322732不是IntegerLong(因爲它是大於Integer.MAX_VALUE)。所以,如果你真的長期將它轉換爲32位INT(想不通爲什麼實際),你可以這樣做:

Integer.toBinaryString((int)11728322732L); 
+1

很好的回答,但這一數字比'Integer.MAX_VALUE'大;) – aliteralmind

+2

@aliteralmind很好。修復! – xav

+0

我使用整數,所以Integer.toBinaryString(...)工作得很好,謝謝 – TomM12