FieldPosition setEndIndex() method in Java with Example
The setEndIndex() method of java.text.FieldPosition class is used to set the index of the character which is preceded by the last character in FieldPosition object.
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.
public void setEndIndex(int ei)
Parameter: This method takes the integer value index for the new index of the character which is preceded by the last character in FieldPosition object.
Return Value: This method has nothing to return.
Below are the examples to illustrate the getEndIndex() method:
end index :- 10
end index :- 5