Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainClass {
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- System.out.println(invoer("test"));
- }
- private static int invoer(String input){
- int aantal = -1;
- try{
- aantal = Integer.parseInt(input);
- }
- catch(Exception e){
- System.out.println("geen getal");
- }
- return aantal;
- }
- }
Add Comment
Please, Sign In to add comment