mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-18 17:31:13 +08:00
Comment revisions
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
package Conversions;
|
||||
|
||||
//Hex [0-9],[A-F] -> Binary [0,1]
|
||||
|
||||
public class HexaDecimalToBinary {
|
||||
|
||||
private final int LONG_BITS = 8;
|
||||
@ -9,7 +11,7 @@ public class HexaDecimalToBinary {
|
||||
int conHex = Integer.parseInt(numHex, 16);
|
||||
// Hex a Binary:
|
||||
String binary = Integer.toBinaryString(conHex);
|
||||
// Presentation:
|
||||
// Output:
|
||||
System.out.println(numHex + " = " + completeDigits(binary));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user