Advertisement
Guest User

Untitled

a guest
Feb 21st, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.00 KB | None | 0 0
  1. public class WordGame
  2. {
  3.         public static void main(String[] args)
  4. {
  5. String name;
  6.                 name= JOptionPane.showInputDialog("Bryce");
  7. String age;
  8.                 age= JOptionPane.showInputDialog("19");
  9. String city;
  10.                 city= JOptionPane.showInputDialog("Sherman");
  11. String college;
  12.                 college= JOptionPane.showInputDialog("Lincoln Land Community College");
  13. String profession;
  14.                 profession= JOptionPane.showInputDialog("Information Technologist");
  15. String animal;
  16.                 animal= JOptionPane.showInputDialog("dog");
  17. string pet;
  18.                 pet=JOptionPane.showInputDialog("spot");
  19. String str="There once was a person named "+ name+
  20. " \n who lived in CITY. At the age of "+age+
  21. ", "+ name +" went to college at \n"+ college+" ."+ name
  22. +" graduated and went to work as a \n"+profession+" . Then, "+ name
  23. +" adopted a(n) "+ animal +" \n named "+ pet+
  24. ". They both lived happily ever after!";
  25. JOptionPane.showMessageDialog(null, str);
  26.         }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement