示例:
List<String> list = new ArrayList<String>(); //This would give me the class name for the list reference variable. list.getClass().getSimpleName();
我想从list引用变量中获取接口名称.有什么办法可以吗?
list
java interface class
class ×1
interface ×1
java ×1