I feel like I understand the other pieces of this task, but I was curious about the class. Can someone explain what the second two sections are doing?
public static class Cat {
private String name;
public Cat(String name) {
this.name = name;
}
public String toString() {
return "Cat " + this.name;
}
}
Question about the cat class
Resolved
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Ryan Palmer
5 March 2021, 04:15
Thank you Lupe!
+1
Guadalupe Gagnon
4 March 2021, 19:24solution
+4
Guadalupe Gagnon
4 March 2021, 19:40
+2