Method(String, char) not applicable for the arguments()

Hi. Im trying to run this method that I made but I cant coz I always get this error. the ff is my code:

class Sample {

private String word = "apple";

private char a = 'p';

public static void main(String[] args)

{

callingCounter();

}

public int counter(String word, char a)

{

int position = 0;

for (int i=0; i<word.length(); i++)

{

position = word.indexOf(a);

System.out.println(position);

}

return position;

}

public int numberOfLetters(String word, char a)

{

return numberOfLetters;

}

}

thanks a lot>

[655 byte] By [floydc_1999a] at [2007-11-27 4:34:11]
# 1
public static void main(String[] args){callingCounter(word a);}look at the changes
AnanSmritia at 2007-7-12 9:44:05 > top of Java-index,Java Essentials,Java Programming...
# 2

and your method should be

public int callingCounter(String word, char a)

{

int position = 0;

for (int i=0; i<word.length(); i++)

{

position = word.indexOf(a);

System.out.println(position);

}

return position;

}

>

AnanSmritia at 2007-7-12 9:44:05 > top of Java-index,Java Essentials,Java Programming...