Java Scanner Usage getLngIn()

Here you can find the source of getLngIn()

Description

This returns a long number from user input

License

Open Source License

Return

long from user input

Declaration

public static long getLngIn() 

Method Source Code

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

import java.util.Scanner;

public class Main {
    private static Scanner sc = new Scanner(System.in);

    /**/*from  w w  w .  ja  va 2  s .  co  m*/
     * This returns a long number from user input
     *
     * @return long from user input
     */
    public static long getLngIn() {
        return sc.nextLong();
    }
}

Related

  1. getInt()
  2. getInt(Scanner sc)
  3. getInteger(String parameter)
  4. getLines(String str)
  5. getLineStartingWith(Scanner scanner, String starts)
  6. getNextInput(Scanner scan)
  7. getNextLine(final Scanner scanner)
  8. getNextLine(final Scanner source)
  9. getNextWord(Scanner scan)