标签:com ima inf ping over ota bsp image 技术分享
1 @OVerride:指定方法覆载,它强制一个子类必须覆盖父类方法
package ThrowableTest; class Apple { public void info() { System.out.println("zhegeshuiguode1shipingguo"); } } public class Fruit extends Apple{ @Override public void info() { System.out.println("zhegeshuiguode1xinxishi:"); } }
2@Deprecated:表示某个程序元素(类、方法)已过时
package ThrowableTest; class Apple1 { //定义info方法已过时 @Deprecated public void info() { System.out.println("打鼾王"); } } public class DeprecatedTest { public static void main(String[] args) { new Apple1().info(); } }
3 @SuppressWarnings
指示该Annotation修饰的程序元素取消编译器警告
标签:com ima inf ping over ota bsp image 技术分享
原文地址:http://www.cnblogs.com/linjingjia/p/7324230.html