Code example for Scanner

Methods: closenextLine

0
        System.out.println(new Date());
 
    } 
 
    private void readFromConsole() { 
        Scanner in = new Scanner(System.in);
        in.nextLine();
        in.close();
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE