-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram2.java
22 lines (16 loc) · 1003 Bytes
/
Program2.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Jordan Romano - CSIS 212(B01)
The purpose of this program is to welcome and display a user's name in a JOptionPane input and message box */
public class Program2 {
/* this is the method that begins the
execution of the Java application */
public static void main(String[] args) {
// dialog box that stores user input in the "name" variable
String name = javax.swing.JOptionPane.showInputDialog("Enter name:");
//scripture variable
String scripture = "Romans 1:20";
// "welcome" variable stores the welcome message, "name" variable and the "scripture" variable
String welcome = "Welcome, " + name + ", To The Liberty University Website!" + " The Scripture for the day is: " + scripture;
// message box displays the text and information stored in the welcome variable
javax.swing.JOptionPane.showMessageDialog(null,welcome);
} //end method
} //end class