本文介紹了將 int 轉(zhuǎn)換為 Java 中的二進制字符串表示形式?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
在 Java 中將 int 轉(zhuǎn)換為二進制字符串表示形式的最佳方法(理想情況下,最簡單)是什么?
What would be the best way (ideally, simplest) to convert an int to a binary string representation in Java?
例如,假設 int 是 156.它的二進制字符串表示將是10011100".
For example, say the int is 156. The binary string representation of this would be "10011100".
推薦答案
Integer.toBinaryString(int i)
這篇關(guān)于將 int 轉(zhuǎn)換為 Java 中的二進制字符串表示形式?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!