java中,Formatter是个抽象类,为什么可以直接new出来?
ringa_lee
ringa_lee 2017-04-17 17:17:26
0
2
306
public abstract class Formatter
        extends Object
ringa_lee
ringa_lee

ringa_lee

reply all(2)
小葫芦

This can be newnew

package java.util;

public final class Formatter
extends Object
implements Closeable, Flushable
{}

这个是不能 new
package java.util.logging;

public abstract class Formatter
extends Object
{}

This cannot be new🎜 rrreee
Peter_Zhu

After implementing the interface, new is the generated anonymous class:
Such as:
new interface(){

....

}

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!