Hi guys, so I'm going through a tutorial and they're provided the following code.
public class Puppy {
public Puppy() {
}
public Puppy(String name) {
// This constructor has one parameter, name.
}
}
I can see Puppy is a public class, it's not static or void, void means the class doesn't return a value. Can classes use void ? not sure about void and static yet.
So then there's public Puppy, is this a sub class, method or a constructor ? then there's public Puppy (string name) now I know this is a user created constructor.