Created
March 1, 2021 11:43
-
-
Save Alkimisti/ee1d4055cd289e705487fbf5b03a38ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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