Code example for StringCharacterIterator

Methods: equals, next

0
        } catch (IllegalArgumentException e) {
            // Expected 
        } 
 
        try { 
            new StringCharacterIterator("value", 2, 4, 1);
            fail("no illegal argument: location greater than start");
        } catch (IllegalArgumentException e) {
            // Expected 
        } 
 
        try { 
            new StringCharacterIterator("value", 0, 2, 3);
            fail("no illegal argument: location greater than start");
        } catch (IllegalArgumentException e) {
            // Expected 
        } 
    } 
 
    /** 
     * @tests java.text.StringCharacterIterator.equals(Object)