Logo

Programming-Idioms

History of Idiom 76 > diff from v36 to v37

Edit summary for version 37 by :
[Java] +DocURL

Version 36

2016-01-01, 00:21:08

Version 37

2016-01-01, 01:32:25

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Code
String s = Integer.toBinaryString(x)
Code
String s = Integer.toBinaryString(x)
Doc URL
https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#toBinaryString%28int%29