+ 1

What is an instance?

28th Aug 2017, 4:12 AM
Shubham Gupta
Shubham Gupta - avatar
2 Respostas
+ 3
A building in the street is an instance of the blueprint. An object in your running code is an instance of the class. When you instantiate a class, it means you are building an object according the class you named. Animal dog = new Animal means variable dog now exists, because you ordered a new instance of animal.
28th Aug 2017, 4:31 AM
JUAN ANTONIO SARMIENTO
JUAN ANTONIO SARMIENTO - avatar
+ 6
What's a lesson in Sololearn? If you looked at one you will know
28th Aug 2017, 5:31 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar