Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
public String do(Person p){}
如何获取参数Person包名?我只能获取参数类型,只能获取类名。
您可以使用:
p.getClass().getPackage().getName();