Closing scanners.

This commit is contained in:
Hassan
2020-01-28 18:34:52 +02:00
parent 4f45c5a479
commit a1f59c38b1
27 changed files with 29 additions and 4 deletions

View File

@ -52,6 +52,7 @@ public class AnyBaseToAnyBase {
}
}
System.out.println(base2base(n, b1, b2));
in.close();
}
/**

View File

@ -24,6 +24,7 @@ public class AnytoAny {
dec /= db;
}
System.out.println(dn);
scn.close();
}
}

View File

@ -53,6 +53,7 @@ class DecimalToBinary {
n >>= 1;
}
System.out.println("\tBinary number: " + b);
input.close();
}
}

View File

@ -64,7 +64,6 @@ public class HexToOct {
// convert decimal to octal
octalnum = decimal2octal(decnum);
System.out.println("Number in octal: " + octalnum);
scan.close();
}
}

View File

@ -34,7 +34,7 @@ public class HexaDecimalToDecimal {
and it returns the decimal form in the variable dec_output.
*/
System.out.println("Number in Decimal: " + dec_output);
scan.close();
}
}

View File

@ -59,6 +59,7 @@ public class OctalToHexadecimal {
// Pass the decimla number to function and get converted Hex form of the number
String hex = DecimalToHex(decimal);
System.out.println("The Hexadecimal equivalant is: " + hex);
input.close();
}
}