Java Reflection - Java Modifier.toString(int mod)


Modifier.toString(int mod) has the following syntax.

public static String toString(int mod)


In the following code shows how to use Modifier.toString(int mod) method.

//from   w  w  w . j  av a  2  s  . c  om
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;

public class Main {
  public static void main(String... args) throws Exception {
    Class<?> c = Class.forName("java.lang.String");
    Constructor[] allConstructors = c.getDeclaredConstructors();
    for (Constructor ctor : allConstructors) {