Constructor blues
Hi,
·
I’m learning how to use constructors in Java. In the attached program I get an error message that points to the xyz=new Duck(); statement and I don’t know why. Can someone explain what’s going on?
·
·
Thanks,
·
Enrique
·
I’m learning how to use constructors in Java. In the attached program I get an error message that points to the xyz=new Duck(); statement and I don’t know why. Can someone explain what’s going on?
·
·
Thanks,
·
Enrique
Comments
public static class Duck {
· ...
}
regards peter