Modifiers fieldModifiers() method in Java with Examples Last Updated : 24 Sep, 2019 Comments Improve Suggest changes Like Article Like Report The fieldModifiers() method of java.lang.reflect.Modifier class is used to get an integer value together with the modifiers of source language that can be applied to a field. Syntax: public static boolean fieldModifiers() Parameters: This method accepts nothing. Return: This method returns an int value OR-ing together the source language modifiers that can be applied to a field. . Below programs illustrate fieldModifiers() method: Program 1: Java // Java program to illustrate // fieldModifiers() method import java.lang.reflect.*; public class GFG { public static void main(String[] args) throws NoSuchFieldException, SecurityException { // get Modifier using fieldModifiers() int result = Modifier.fieldModifiers(); System.out.println( "Field Modifiers: " + Modifier.toString(result)); } } Output: Field Modifiers: public protected private static final transient volatile Program 2: Java // Java program to illustrate fieldModifiers() import java.lang.reflect.*; public class GFG { public static void main(String[] args) throws NoSuchFieldException, SecurityException { // get Modifier using fieldModifiers() int result = Modifier.fieldModifiers(); System.out.println( "Int Value: " + result); } } Output: Int Value: 223 References: https://docs.oracle.com/javase/10/docs/api/java/lang/reflect/Modifier.html#fieldModifiers() Comment More infoAdvertise with us Next Article Class getModifiers() method in Java with Examples A AmanSingh2210 Follow Improve Article Tags : Java Java-Functions java-lang-reflect-package Java-Modifier Practice Tags : Java Similar Reads Field getModifiers() method in Java with Examples The getModifiers () method of java.lang.reflect.Field used to return the modifiers used for the field object as time of declaration, as an integer. The Modifier class should be used to decode the modifiers. Syntax: public int getModifiers() Parameters: This method accepts nothing. Return: This metho 1 min read Modifiers interfaceModifiers() method in Java with Examples The interfaceModifiers() method of java.lang.reflect.Modifier class is used to get an integer value together with the modifiers of source language that can be applied to an interface. Syntax: public static boolean interfaceModifiers() Parameters: This method accepts nothing. Return: This method retu 1 min read Modifiers interfaceModifiers() method in Java with Examples The interfaceModifiers() method of java.lang.reflect.Modifier class is used to get an integer value together with the modifiers of source language that can be applied to an interface. Syntax: public static boolean interfaceModifiers() Parameters: This method accepts nothing. Return: This method retu 1 min read Field set() method in Java with Examples The set() method of java.lang.reflect.Field is used to set the value of the field represented by this Field object on the specified object argument to the specified new value passed as parameter. The new value is automatically unwrapped if the underlying field has a primitive type. If the field is s 4 min read Class getModifiers() method in Java with Examples The getModifiers() method of java.lang.Class class is used to get the Java language modifiers of this class. The method returns an integer representing the encoded modifiers of this class. Syntax: public int getModifiers() Parameter: This method does not accept any parameter.Return Value: This metho 2 min read Class getModifiers() method in Java with Examples The getModifiers() method of java.lang.Class class is used to get the Java language modifiers of this class. The method returns an integer representing the encoded modifiers of this class. Syntax: public int getModifiers() Parameter: This method does not accept any parameter.Return Value: This metho 2 min read Like