Created
March 1, 2021 11:39
-
-
Save Alkimisti/ec6c2bc282445842f13575b6aae7f0cf 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 Binary2Decimal { | |
public static void main(String[] args) { | |
String bin = "10101110"; | |
int dec = Integer.parseInt(bin, 2); | |
System.out.println(dec); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment