House Equals New Dog – Intro to Java Programming

That was a lot of new information, let’s take some time to digest it before moving on. What will happen if I tried to declare a variable house of type house and then create a new dog and try to put that into the variable house. Will, the program declare a variable of type house and store a new dog in it. Will we get an error in compatible types because dog is not a kind of house? Or will we get an error dog is abstract cannot be instantiated?

Leave a Reply

Your email address will not be published. Required fields are marked *