Java: Interface with new keyword how is that possible?

前端 未结 9 1517
抹茶落季
抹茶落季 2020-12-04 08:21

I was reading some sourcecode from Java libraries, and I am confused here;

This code is from Document.java in jaxb library, and ContentVisitor is an Interfac

9条回答
  •  长情又很酷
    2020-12-04 09:20

    There's something called anonymous class in java http://www.java2s.com/Code/Java/Class/Anonymous-class.htm

提交回复
热议问题