I have to write a java program that basically convert decimal to binary and print it out using array. I have a function to reads in an input from the users and I'm not sure how to take that input and have it store in my function I have to convert it to binary. Below is a a snippet of my program with 120 being hard coded into the program just for testing purposes, but I don't know how to get .convert to take the argument of what the user inputs from the keyboard. need any more info please let me know.
DecToBinArray arr = new DecToBinArray();
arr.convert(120);
Comments
Leave a comment