Code example for Scanner

Methods: radixuseRadix

0
 
    /** 
     * @tests java.util.Scanner#useRadix() 
     */ 
    public void test_useRadix_I() { 
        s = new Scanner("test");
        try { 
            s.useRadix(Character.MIN_RADIX - 1);
            fail("Should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // expected 
        } 
        try { 
            s.useRadix(Character.MAX_RADIX + 1);
            fail("Should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // expected 
        } 
        s.useRadix(11);
        assertEquals(11, s.radix());
    } 
 
    /** 
     * @tests java.util.Scanner#remove() 
     */ 
Connect your IDE to all the code out there  Get Codota for Java