Someone asked me this question in an interview. I am not sure if it is a valid question or not. If it is please reply. Thanks
java.lang.Class
implictly extends java.lang.Object
, like every other object type, so it inherits both this methods from Object
:
Class<?> clazz = new Object().getClass();
clazz.wait();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.