public class Dog { public String name; public Dog() { name = "Max"; } public Dog(String nm) { name = nm; } public void setName(String name) { this.name = name; } }
Options:
- The setName method can be used to modify data in the class definition
- The class definition represents a Dog
- There are two constructor methods that could be used to create the name string
- The class definition contains a single piece of data
- An instance of the class is created