Skip to content

Instantly share code, notes, and snippets.

@Alkimisti
Created March 1, 2021 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alkimisti/ee1d4055cd289e705487fbf5b03a38ab to your computer and use it in GitHub Desktop.
Save Alkimisti/ee1d4055cd289e705487fbf5b03a38ab to your computer and use it in GitHub Desktop.
public class Decimal2Binary {
public static void main(String[] args){
String b1 = Integer.toBinaryString(1);
System.out.println(b1);
String b2 = Integer.toBinaryString(12);
System.out.println(b2);
String b3 = Integer.toBinaryString(123);
System.out.println(b3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment