why cant i call this method?

Can someone please tell me why I cannot call dime(); from the case statement in coin()

The error I am getting is

init:

deps-jar:

Compiling 2 source files to C:\171 pberardi projects\pberardi 171DB4\build\classes

C:\171 pberardi projects\pberardi 171DB4\src\CoinBank.java:100: dime(java.lang.String) in CoinBank cannot be applied to ()

dime();Note: C:\171 pberardi projects\pberardi 171DB4\src\CoinBank.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

1 error

BUILD FAILED (total time: 3 seconds)

/*

* CoinBank.java

*

* Created on June 21, 2007, 10:00 PM

*

* To change this template, choose Tools | Template Manager

* and open the template in the editor.

*/

/**

*

import java.util.List;

import java.util.LinkedList;

import java.util.Scanner;

import java.util.ListIterator;

import java.text.Format;

import java.util.Calendar;

public class CoinBank {

Scanner input = new Scanner(System.in);

LinkedList nickels = new LinkedList();

LinkedList dimes = new LinkedList();

LinkedList quarters = new LinkedList();

int coin;

int ncount;

int dcount;

int qcount;

String type;

/** Creates a new instance of CoinBank */

publicstaticvoid main(String args[]){

CoinBank c =new CoinBank();

c.coin();

}

publicvoid coin(){

do

{

System.out.println(" Deposit coins");

System.out.println("When finish entering coins, enter -1");

coin = input.nextInt();

switch(coin){

case 5:

System.out.println("entering nickel");

nickel();

break;

case 10:

System.out.println("entering dime");

[b] dime();[/b]break;

case 25:

System.out.println("entering quarter");

quarter();

break;

}//end switch

}while (coin!=-1);//end do while

print();

}//end coin method

publicvoid print(){

System.out.println(ncount+" Nickles were entered");

System.out.println(dcount+" Dimes were entered");

System.out.println(qcount+" Quarters were entered");

System.out.println("Printing contents of Linked List");

System.out.println("");

ListIterator< String > iteratorn = nickels.listIterator( nickels.size() );

System.out.println("\nReversed List:" );

while ( iteratorn.hasPrevious() )

System.out.printf("%s ", iteratorn.previous() );

// System.out.println(nickels);

ListIterator< String > iteratord = dimes.listIterator( dimes.size() );

System.out.println("\nReversed List:" );

while ( iteratord.hasPrevious() )

System.out.printf("%s ", iteratord.previous() );

// System.out.println(dimes);

ListIterator< String > iteratorq = quarters.listIterator( quarters.size() );

System.out.println("\nReversed List:" );

while ( iteratorq.hasPrevious() )

System.out.printf("%s ", iteratorq.previous() );

// System.out.println(quarters);

}

publicvoid nickel(){

System.out.println("You just deposited a nickel");

ncount = ncount +1;

Calendar dateTimen = Calendar.getInstance();

type ="nickel was entered at";

String clStrTimen = String.format("[%d:%d:%d:%d:%d %S]" ,

dateTimen.get(Calendar.DAY_OF_WEEK),

dateTimen.get(Calendar.HOUR) ,

dateTimen.get(Calendar.MINUTE) ,

dateTimen.get(Calendar.SECOND) ,

dateTimen.get(Calendar.MILLISECOND) ,

dateTimen.get(Calendar.AM_PM) == Calendar.PM ?"PM" :"AM" );

nickels.add(clStrTimen);

nickels.add(type);

}

publicvoid dime(String clStrTimed){

System.out.println("You just deposited a dime");

dcount = dcount + 1;

// Calendar dateTimed = Calendar.getInstance();

type ="dime was entered at";

/*String clStrTimed = String.format( "[%d:%d:%d:%d %S]" ,

dateTimed.get(Calendar.HOUR) ,

dateTimed.get(Calendar.MINUTE) ,

dateTimed.get(Calendar.SECOND) ,

dateTimed.get(Calendar.MILLISECOND) ,

dateTimed.get(Calendar.AM_PM) == Calendar.PM ? "PM" : "AM" );*/

dimes.add(clStrTimed);

dimes.add(type);

}

publicvoid quarter(){

System.out.println("You just deposited a quarter");

qcount = qcount +1;

Calendar dateTimeq = Calendar.getInstance();

type ="quarter was entered at";

String clStrTimeq = String.format("[%d:%d:%d:%d %S]" ,

dateTimeq.get(Calendar.HOUR) ,

dateTimeq.get(Calendar.MINUTE) ,

dateTimeq.get(Calendar.SECOND) ,

dateTimeq.get(Calendar.MILLISECOND) ,

dateTimeq.get(Calendar.AM_PM) == Calendar.PM ?"PM" :"AM" );

quarters.add(clStrTimeq);

quarters.add(type);

}

}//end class

[7272 byte] By [pberardi1a] at [2007-11-27 8:38:46]
# 1
could it have anything to do with the fact that you call dime without arguments but it is defined as having a String parameter?
petes1234a at 2007-7-12 20:36:35 > top of Java-index,Java Essentials,New To Java...
# 2
Read the error message closely. Look at how the dime method is declared. Look at how you're calling it. Can you not piece together your error from these three things?
jverda at 2007-7-12 20:36:35 > top of Java-index,Java Essentials,New To Java...