dimanche 1 mars 2015

Incompatable type error when trying to create a new object

I have a class called Artist where I have created a constructor:



public Artist(String artistName)
{
artistName = artist;
setupGigs();
setupBookings();
}


In the IO class, I am trying to create a new artist to begin with using the constructor in the Artist class:



public GameIO(String nme)
{
artist = new Artist(nme);
}


Each time I compile, I get the error message I am using incompatible types. Should I be doing something different and if so, could someone advise on the best path possible.


Aucun commentaire:

Enregistrer un commentaire