Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class WordGame
- {
- public static void main(String[] args)
- {
- String name;
- name= JOptionPane.showInputDialog("Bryce");
- String age;
- age= JOptionPane.showInputDialog("19");
- String city;
- city= JOptionPane.showInputDialog("Sherman");
- String college;
- college= JOptionPane.showInputDialog("Lincoln Land Community College");
- String profession;
- profession= JOptionPane.showInputDialog("Information Technologist");
- String animal;
- animal= JOptionPane.showInputDialog("dog");
- string pet;
- pet=JOptionPane.showInputDialog("spot");
- String str="There once was a person named "+ name+
- " \n who lived in CITY. At the age of "+age+
- ", "+ name +" went to college at \n"+ college+" ."+ name
- +" graduated and went to work as a \n"+profession+" . Then, "+ name
- +" adopted a(n) "+ animal +" \n named "+ pet+
- ". They both lived happily ever after!";
- JOptionPane.showMessageDialog(null, str);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement