public interface Marker { }
定义Marker的实现类SubMarker:
public class SubMarker implements Marker { public static void main(String[] args) { System.out.println("SubMarker实现接口Marker"); } }
运行结果:
SubMarker实现接口Marker
本文共 257 字,大约阅读时间需要 1 分钟。
public interface Marker { }
定义Marker的实现类SubMarker:
public class SubMarker implements Marker { public static void main(String[] args) { System.out.println("SubMarker实现接口Marker"); } }
运行结果:
SubMarker实现接口Marker
转载于:https://my.oschina.net/hasonger/blog/211678