ParsePosition toString Example

ParsePosition class toString example. This example shows you how to use toString method.


ParsePosition class toString example. public String toString() Return a string representation of this ParsePosition.

Here is the code
/*
 * @ # toString.java
 * A class representing use to toString method of
 * ParsePosition class in java.text package
 * version 14 June 2008
 * author Rose India 
 */

import java.text.*;

public class ToString {

    public static void main(String[] args) {
        // create instance of parse position 
        ParsePosition p = new ParsePosition(10);

        System.out.println(p.toString());
    }
}

Output
java.text.ParsePosition[index=10,errorIndex=-1]

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US