This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
OlderNewer