Instantiating an inner class

前端 未结 4 1476
逝去的感伤
逝去的感伤 2020-12-29 08:51

I have a utility method and when irrelevant logic is removed from it, the simplified method would look like this:

public static  List<         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-29 09:45

    This exception will be thrown only if clazz represents either an abstract class or an interface. Are you sure you're passing a Class object that represents a concrete class?

提交回复
热议问题