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