Here you can find the source of getInt(Scanner sc)
public static int getInt(Scanner sc)
//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; } }