FieldPosition getBeginIndex() method in Java with Example
The getBeginIndex() method of java.text.FieldPosition class is used to get the index of the beginning character of the FieldPosition object.
public int getBeginIndex()
Parameter: This method does not accept any argument as a parameter.
Return Value: This method returns the index of the beginning character of the FieldPosition object.
Below are the examples to illustrate the getBeginIndex() method:
begin index :- 0
begin index :- 5
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.