笔试中出现一段new thread(){}的写法

public static void main(String args[]) {

    Thread t = new Thread() {

public void run() {
pong();
}
};
thread
t.run();
System.out.print("ping");
}

static void pong() {
System.out.print("pong");
}
这是一种怎样的写法,求讲解

Java的匿名内部类