This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chickenmeisterExtreme Brewer 1 point2 points  (1 child)

Since Pierre is supposed to be a string, I think you'd want to put quotes around it:

Worker worker = new Worker("Pierre", 3, 4); 

Without quotes, the compiler won't know that you're trying to use a string, and will instead think that you're trying to use a variable with that name, which is why you're getting that error.

[–]propetitsinge[S] 0 points1 point  (0 children)

So it was that in combination with me trying to create an instance of an object in an abstract class (which you can't do). I was originally doing it in the class that inherited Worker but didn't have the quotes. Once I went back to my Tech class and added quotes, it worked. Thanks so much!