I compile the program fine, just that I would like to call the PrepaidCard constructor instead of calling the setCardID method.
Do you know if it is possible to do that?
Type: Posts; User: ymbulk
I compile the program fine, just that I would like to call the PrepaidCard constructor instead of calling the setCardID method.
Do you know if it is possible to do that?
This is the PrepaidCard class.
public class PrepaidCard
{
private String cardID;
private int tokenBalance;
public PrepaidCard(String id, int token)
{
cardID = id;
Thanks for your reply and reminder of cross posting.
I have omitted the declaration of the variables, but if you want, I can update the code to make it compile.
Do you know how to call the...
Hey guys, I am trying to call a constructor from PrepaidCard class in my main method, but I am not sure how to proceed.
As seen below, both the PrepaidCard constructor and the setCardID method...