java - Is the object of an abstract class an anonymous inner class? -


this question has answer here:

when create object of abstract class, have interface.

abstractclass abstractclass = new abstractclass() {            @override           public void abstractmethod() {           }         }; 

does mean object of abstractclass anonymous inner class object?

an object not class object (in context). derived class. in java there difference between classes , objects, compared e.g. prototype based languages (e.g. javascript) difference not exist.

in example create anonymous class, create object of anonymous class , assign variable; in 1 step.

anonymous classes inner classes: http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.9.5 http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.1.3


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -