mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-10 04:26:27 +08:00
Update DecimalToBinary.java
Close ressource leak Scanner input
This commit is contained in:
@ -35,6 +35,7 @@ class DecimalToBinary {
|
|||||||
n /= 2;
|
n /= 2;
|
||||||
} //converting decimal to binary
|
} //converting decimal to binary
|
||||||
System.out.println("\tBinary number: " + b);
|
System.out.println("\tBinary number: " + b);
|
||||||
|
input.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user