This content has been marked as final. Show 6 replies
Your code confuses me some. A couple of questions:
Do you have an array that holds number of vowels and words for certain line? If so did you name your array the same as the local variables?
Do you need to pass line as one of your parameters?
Do you really mean for vowelCount to be an int and not a float?
Do you need to initialize the variables that the compiler complains need to be initialized?
Does your compiler complain that countChar needs to return an int result?
pokoleo wrote:but you are using the same variable names for your array (vowelCount and wordCount) as for the local variables in your method. This is a Bad Thing.
but I've initialized the arrays:
public static int vowelCount=new int ;
public static int wordCount=new int ;
public static int line=1;
public static void main(String args) throws IOException
Edited by: pokoleo on Apr 28, 2008 8:49 PM