Java Scanner Usage nextChar(Scanner s)

Here you can find the source of nextChar(Scanner s)

Description

read exactly one character from the scanner from: http://stackoverflow.com/a/13942707/1066911

License

Open Source License

Declaration

public static char nextChar(Scanner s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Scanner;

public class Main {
    /**//from  w w w. ja v  a 2 s .c  o m
     * read exactly one character from the scanner
     * from: http://stackoverflow.com/a/13942707/1066911
     */
    public static char nextChar(Scanner s) {
        return s.findInLine(".").charAt(0);
    }
}

Related

  1. listify(String s, String prefix, String... ignorelist)
  2. listify(String s, String prefix, String... ignorelist)
  3. loadElements(Scanner scan, int elementCount, int skipCount)
  4. loadStringDoubleMap(Scanner scanner)
  5. menu()
  6. nextInt(final Scanner sc)
  7. numberOfLines(String text)
  8. OperasiMasukan()
  9. parameterInput(int start, int end)