How do you go about doing this? Is it as simple as this:
Name myName = new Name();
I'm a little confused. It should be a class with no instance variables. I simply have to "create an empty object". The constructor will also be empty of course.
An "empty object" is pretty ambiguous in java terms. I could interpret that as this:
Object empty = new Object();
which is about the emptiest object you can create.
However in your example,
Name myName = new Name();
That's going to create an object based on whatever code you've put in your default constructor. (Which, i guess if you're setting everything to a default value, is pretty empty)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With