FieldPosition getFieldAttribute() method in Java with Example
The getFieldAttribute() method of java.text.FieldPosition class is used to get the field identifier in the form of Format.field.
public Format.Field getFieldAttribute()
Parameter: This method does not accepts any argument as parameter.
Return Value: This method returns the field identifier in the form of Format.field.
Below are the examples to illustrate the getFieldAttribute() method:
field identifier. :- java.text.MessageFormat$Field(message argument field)
field identifier. :- java.text.DateFormat$Field(am pm)
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.