SHOW:
|
|
- or go back to the newest paste.
1 | package com.nciatronTg.shankshock.foobar; | |
2 | ||
3 | import java.util.Scanner; | |
4 | ||
5 | public class Main { | |
6 | ||
7 | /** | |
8 | * @param args | |
9 | */ | |
10 | public static void main(String[] args) { | |
11 | - | // TODO Auto-generated method stub |
11 | + | askQuestion(); |
12 | } | |
13 | ||
14 | public static void askQuestion() | |
15 | - | System.out.println("Are you gay? \n"); |
15 | + | { |
16 | if (askQuestion("Do you like waffles?")) | |
17 | - | if (answer.equalsIgnoreCase("Yes")) { |
17 | + | { |
18 | - | System.out.println("Penis"); |
18 | + | System.out.println("Yay, waffles!"); |
19 | - | } else if (answer.equalsIgnoreCase("No")){ |
19 | + | } else |
20 | - | System.out.println("Are you sure sure?"); |
20 | + | { |
21 | - | Scanner confirmation = new Scanner(System.in); |
21 | + | if (askQuestion("Are you sure?")) |
22 | - | String foobar = confirmation.nextLine(); |
22 | + | |
23 | - | if (foobar.equals("Yes")) |
23 | + | System.out.println("Fine!"); |
24 | } | |
25 | - | System.out.println("Fookies!"); |
25 | + | askQuestion(); |
26 | - | } else { |
26 | + | |
27 | - | System.out.println("Not fookies!"); |
27 | + | |
28 | ||
29 | public static boolean askQuestion(String question) | |
30 | { | |
31 | Scanner input = new Scanner(System.in); | |
32 | String answer; | |
33 | ||
34 | System.out.println(question); | |
35 | answer = input.nextLine(); | |
36 | if (answer.equalsIgnoreCase("Yes")) | |
37 | { | |
38 | return true; | |
39 | } | |
40 | return false; | |
41 | } | |
42 | ||
43 | } | |
44 | ||
45 |