Skip to content

Instantly share code, notes, and snippets.

View alvadorn's full-sized avatar

Igor Sant'Ana alvadorn

View GitHub Profile
import java.util.Scanner;
public class TryCatchExample {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("\nDigite o palpite");
int userTry = TryCatchExample.tryDigit(scan);
}
public static int tryDigit(Scanner scan) {