Java Scanner Usage getInt(Scanner sc)

Here you can find the source of getInt(Scanner sc)

Description

get Int

License

Open Source License

Declaration

public static int getInt(Scanner sc) 

Method Source Code

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

import java.util.Scanner;

public class Main {
    public static int getInt(Scanner sc) {
        int result = sc.nextInt();
        sc.nextLine();/*from   w  w  w  . j a v  a2  s .  c o  m*/
        return result;
    }
}

Related

  1. getEndLine(String cqlString)
  2. getExtensions(Scanner scanner)
  3. getFirstInt(String s)
  4. getInput(Scanner in, String message, boolean allowNull)
  5. getInt()
  6. getInteger(String parameter)
  7. getLines(String str)
  8. getLineStartingWith(Scanner scanner, String starts)
  9. getLngIn()