|
Need help with a question please
I am currently working through a java book and would like some help in understanding the following question:-
Exercise 2.19 Suppose that the class Pet has a field called name that is of type
String. Write an assignment statement in the body of the following constructor so
that the name field will be initialized with the value of the constructor’s parameter.
public Pet(String petsName)
{
...
}
Thanks in advance, I am really keen to get my head round this and would appricate any help
|