Code example for Scanner

Methods: locale, useLocale

0
 
    /** 
     * @tests java.util.Scanner#useLocale(Locale) 
     */ 
    public void test_useLocale_LLocale() { 
        s = new Scanner("test");
        try { 
            s.useLocale(null);
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected 
        } 
 
        s.useLocale(new Locale("test", "test"));
        assertEquals(new Locale("test", "test"), s.locale());
    } 
 
    /** 
     * @tests java.util.Scanner#radix() 
     */ 
    public void test_radix() {