Code example for Scanner

Methods: localeuseLocale

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() 
     */ 
Stop searching for code, let great code find you!  Add Codota to your java IDE