ParsePosition setIndex() method in Java with Example
The setIndex() method of java.text.ParsePosition class is used to set the current parse position of this ParsePositon object .
public void setIndex(int index)
Parameter: This method takes integer index at which current parse position is going to be set.
Return Value: This method has nothing to return.
Below are the examples to illustrate the setIndex() method:
current parse position: 3
current parse position: 30
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.