An efficient, working, version of what I believe your objective is:
class BinaryTest {
static String decimaleToBinaryString(int decimal) {
return Integer.toBinaryString(decimal);
}
public static void main(String... argv) {
System.console.format("%s", decimalToBinaryString(Integer.parseInt(System.console().readLine("Please enter the decimal integer you would like to convert into a binary string: ")));
}
}