forked from League-Archive/IntroToJavaWorkshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrob.java
More file actions
44 lines (21 loc) · 644 Bytes
/
Copy pathrob.java
File metadata and controls
44 lines (21 loc) · 644 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import java.util.Random;
import javax.swing.JOptionPane;
public class rob {
public static void main(String[] args) {
int random = new Random().nextInt(4);
System.out.println(random);
String randomquestion= JOptionPane.showInputDialog(null, "question here");
if (random==0) {
JOptionPane.showMessageDialog(null, "yes");
}
if (random==1) {
JOptionPane.showMessageDialog(null, "no");
}
if (random==2) {
JOptionPane.showMessageDialog(null, "maybe you should ask google");
}
if (random==3) {
JOptionPane.showMessageDialog(null, "idk go ask your friends");
}
}
}