Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.lang.reflect.Method;
- import java.lang.reflect.InvocationTargetException;
- import java.util.*;
- public class ctest {
- public static void main(String args[]){
- Class n = int.class;
- Class N = Integer.class;
- if( n.isAssignableFrom(N) )
- System.out.println( "n from N");
- else
- System.out.println( "NOT n from N");
- if( N.isAssignableFrom(n) )
- System.out.println( "N from n");
- else
- System.out.println( "NOT N from n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement