Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static <T> T makeNewInstance(Class<T> cls) {
- T t;
- try {
- t = cls.newInstance();
- return t;
- } catch (InstantiationException | IllegalAccessException e) {
- e.printStackTrace();
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement