I am familiar with programming, but I am learning Java. Why is it ok in Java to say
A test = new B()
Where A would be a different class from B (obviously). I understand that the new B()
portion is just calling the initializer method for the B class. What confuses me is why would you WANT to do that? Is the A test
creating the object in computers memory, with the initialization of A?
This question has nothing to do with interfaces. Why this is marked as a duplicate I have no idea...