Java Modifier.classModifiers()

Syntax

Modifier.classModifiers() has the following syntax.

public static int classModifiers()

Example

In the following code shows how to use Modifier.classModifiers() method.


import java.lang.reflect.Modifier;
/*from  w ww.  j a v  a2s .  c  o  m*/
public class Main {
  public static void main(String... args) throws Exception {
      System.out.println(Modifier.toString(Modifier.classModifiers()));
  }

}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang.reflect »




Array
Constructor
Field
Method
Modifier
ParameterizedType
TypeVariable