Best Posts in Thread: Dogling's adventures into the lands of java.

  1. spidEY シスコン

    Hello world!

    Code:
    import java.util.*;
    import java.lang.*;
    import java.io.*;
    
    class Oi
    {
    	public static void main (String[] args) throws java.lang.Exception
    	{
    		System.out.println("Please Enter 1 or 2");
    		
    		Scanner scanner = new Scanner(System.in);
    		int number;
    
    		try {
    			number = Integer.parseInt(scanner.nextLine());
    		} catch (NumberFormatException e) {
    			System.out.println("Are you a retard? That's not a number");
    			return;
    		}
    		
    		if (number == 1) {
    			System.out.println("You've won mate gratz");
    		} else if (number == 2) {
    			System.out.println("fuck you suck dick");
    		} else {
    			System.out.println("loser");
    		}
    	}
    }
    
     
    • Useful Useful x 4
    • Agree Agree x 1
    • List