BreakIterator last() method in Java with Examples
The last() method of java.text.BreakIterator class is used to get the index of the last boundary. It always return the offset of the last character of last boundary.
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 abstract int last()
Parameter: This method does not accept any parameter.
Return Value: This method provides the index of the last boundary.
Below are the examples to illustrate the last() method:
last boundary : 11
last boundary : 13