注解

it2024-11-16  11

package annotation;

import java.security.PublicKey;

public class TestAnnotation {

@SuppressWarnings(value = {"Unused","rawtypr"}) public static void main(String[] args) { Person person = new Person(); System.out.println(person);//toString }

}

class Person{

/** * 原因: * 替代方案: */ @Deprecated public Person(){ } public Person(String name){ }

// @Override

// public String toString(){

// return “比特人”;

// }

@Override public String toString() { return super.toString(); }

}

最新回复(0)