Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Member;

public class Main {
    public static void main(String[] args) throws ClassNotFoundException {
        Class c = Class.forName("java.util.List");

        Constructor[] constructors = c.getDeclaredConstructors();
        for (int i = 0; i < constructors.length; i++) {
            print_method_or_constructor(constructors[i]);
        }

    }

    public static void print_method_or_constructor(Member member) {
        Constructor c = (Constructor) member;
        Annotation type = c.getAnnotation(Deprecated.class);

    }
}