If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I do know the problem has to lie in where or how my array is declared or where it is positioned. I have read my textbook and other sources and I am still feeling a bit frustrated. Thank you all for any help!

Re: Returning Memory Location

problem seems that the program returns the memory location of the array and not the actual number.

Can you show what is returned?
It sounds like you are getting the output from the Object's default toString() method. If the problemis with your VowelCons class, add a toString method to it:
public String toString() { ....return a nice string here }

Another problem I noticed is the counting class is being shown as being not used

Re: Returning Memory Location

Your code seems confused - in the VowelCons class you have numVowels and numCons int class variables that are initialized to zero and never used, and you have getNumVowels and geNumCons methods that don't return the numVowels and numCons variables, but regenerate and return the arrays every time they are called (why?).

Until you sort out what those methods are supposed to do and give them appropriate names, and decide what those class variables are going to be used for, you're going to be confused, and people trying to help will be even more confused.

Also, printing an array won't automatically give you a count of the items in the array (why should it?), it will just give you the default 'toString' value for an object, which is className@hashCode. If you want the number of elements in an array, use array.length. If you want to print a list of the items, iterate over the array printing each item in turn.

And why not just initialize the arrays once, instead of regenerating them every time you call the method - the array contents never change, so it's just wasting processor time and memory.

If you cannot describe what you are doing as a process, you don't know what you're doing...
W. E. Deming

Please use &#91;CODE]...your code here...&#91;/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.