Answer the question
In order to leave comments, you need to log in
Did not catch up with the paragraph on the declaration, creation and initialization of the object, explain?
The book says:
Three steps towards declaring, creating and initializing an object.
1. We declare a reference variable Dog myDog = new Dog();
2. We create an object Dog myDog = new Dog();
3. We associate an object and a link Dog myDog = new Dog();
But the code is the same everywhere, what is it? What does it mean? Isn't it possible to declare and create and initialize an object with one such line? Usually this happens, but the illustrations in the book confused me a little.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question