...

View Full Version : Basic Java help



kerhong
03-26-2008, 06:38 AM
In a file called BinaryStringPrinter.java write a method with the signature:
public void printStrings(int len)throws IllegalArgumentException
that uses recursion (either directly or indirectly) and prints all of the binary numbers, of length len in numerical order. So, for example, the call printStrings(4) must print:
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
A call printStrings(0) must print an empty line. A call to printStrings with a parameter less than zero must throw an IllegalArgumentException.

sobrien79
03-26-2008, 04:10 PM
Post what you have attempted to do so far and where you are having problems and someone should be able to help you find the problem.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum