Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package rudolph;
  2.  
  3. import javax.swing.JOptionPane;
  4.  
  5. public class IfBlankWasBlank {
  6. public static void main(String[] args) {
  7. String charInput = "";
  8. String thing = "";
  9. String pun = "";
  10.  
  11. charInput = JOptionPane.showInputDialog(null,
  12. "Enter the person or thing you'd like to make fun of:");
  13. thing = JOptionPane.showInputDialog(null,
  14. "Enter the thing that " + charInput +" is doing:");
  15. pun = JOptionPane.showInputDialog(null,
  16. "Enter the pun that " + charInput + " is doing:");
  17.  
  18. String msg = "If " + charInput + " was " + thing + ", then they'd be " + pun + ".";
  19.  
  20.  
  21. JOptionPane.showMessageDialog(null, msg);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement