- public class Human {
- public interface MyAction { public void getPower();
- }
- }
- public class Test{
- public static void main(String[] args) {
- new Human.MyAction() {
- @Override
- public void getPower() {
- }
- }
或
- new Human.MyAction(){
- @Override
- public void getPower() {
- }
- }
- }
- }
来源: http://www.bubuko.com/infodetail-2704544.html