Modifier.isSynchronized(int mod) has the following syntax.
public static boolean isSynchronized(int mod)
In the following code shows how to use Modifier.isSynchronized(int mod) method.
//from ww w . j av a2 s.c o m 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.isSynchronized(modifier)) { System.out.println("isSynchronized"); } } }