Looking for help with program please - newbie programmer ;)

I'm new to Java and I'm currently studying it in my spare time. I have a code question that I just can't seem to figure out and hopefully some of the more experienced folks on here can lend a hand.

I'm coding a wordsearch puzzle and I need to write a helper method called isHorizontalSpaceFree()

The method should check whether(starting from aRow and aCol) there is enough free space to insert word into letterGrid(left to right). If there is enough space, the method should return true, otherwise it should return false.

I need the method to return an out of bounds exception if the word length exceeds the end of the array as well.

Re: Looking for help with program please - newbie programmer ;)

Hi and thanks for the quick respons. I will adhere to the code posting rules from now on - thanks for the pointer ;)

I'm looking at the code and all I can possibly say is that initialising int i = aCol might be wrong.
I think it may be something wrong with the logic or the if conditions though and this is what I can't work out.
Any futher light shed and help is really appreciated here.

Re: Looking for help with program please - newbie programmer ;)

Hi again,

I put in some println()s and it appears to be processing the whole array up to NUMBER_COLS - word.length(). What I need it to do is to check that there is enough space for the word to fit i.e there are enough BLANK_ELEMENT in a row to accomodate the word.length() and for the program to return false if it hits a char() or exceeds the array boundary.