Java Modifier.isAbstract(int mod)

Syntax

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

public static boolean isAbstract(int mod)

Example

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


/*from w w  w .  ja  v a  2  s  . com*/
import java.lang.reflect.Modifier;

public class Main {
  public static void main(String[] args) throws Exception {
    Class<?> clazz = String.class;
    int modifier = clazz.getModifiers();

    if (Modifier.isAbstract(modifier)) {
      System.out.println("isAbstract");
    }
  }
}




















Home »
  Java Tutorial »
    java.lang.reflect »




Array
Constructor
Field
Method
Modifier
ParameterizedType
TypeVariable