// concatenation: example #2 import javax.swing.JOptionPane; public class concatenation2 { public static void main(String[] args) { // Prompt the user to enter a number: String s1 = JOptionPane.showInputDialog("Type 1st input"); String s2 = JOptionPane.showInputDialog("Type 2nd input"); String s3 = s1 + s2; System.out.println(s3); System.exit(0); } }