public class Card
{
private int rank;
private int suit;
public Card(int r,int s){
rank=r;
suit=s;
}
public Card getRank(Card r)
{
return r;
}
public Card getSuit(Card s)
{
return s;
}
}
private static String toImage(Card card)
{
return "" + card.getRank() + "cdhs".charAt(card.getSuit()) + ".gif";
}
}
The first code is the Card class where I am trying to make getter methods that return rank and suit. The second code is a class that needs to use the get methods but it says "method getSuit/getRank cannot be applied to given types. Required: Card Found :no arguments reason: actual and formal argument lists differ in length"