title: How can I use the input from a JOptionPane.showInputDialog to be used as a message?
body: <p>So, I need to take the input I get from (for example)</p>
  
  <pre><code>    JOptionPane.showInputDialog(null, "text");
  </code></pre>
  
  <p>(and if the user enters some text, say, "hello" it would be used as a message in </p>
  
  <pre><code>    JOptionPane.showMessageDialog(null, "Hello");
  </code></pre>
  
  <p>I think I have to use a variable like:
          variable=JOptionPane.showInputDialog(null, "text");</p>
  
  <p>but how do I connect the two and what type will the variable have?</p>