the java interface should not be instantiated, so why make the program work properly in the following form?
(the screenshot on the ebook, the program actually clicked, but I don"t know why)
the java interface should not be instantiated, so why make the program work properly in the following form?
(the screenshot on the ebook, the program actually clicked, but I don"t know why)
this is the way to write an anonymous inner class. After the java file is compiled, an inner class implementation interface is generated
final class TestDemo$1
implements IMessage
{
public void print()
{
}
}
Previous: How does BeautifulSoup's ResultSet, traverse everything?
Next: Python special declaration of non-local variables of the writing, for explanation!