5 Getting Input from Keyboard
5 Getting Input from Keyboard
5 Getting Input from Keyboard
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Sample Program1 import javax.swing.JOptionPane;23 public class Get<strong>Input</strong>From<strong>Keyboard</strong> {45 public static void main( String[] args ){6 String name = "";7 name=JOptionPane.show<strong>Input</strong>Dialog(“Please enter your name");8 String msg = "Hello " + name + "!";9 JOptionPane.showMessageDialog(null, msg);10 }11}Introduction to Programming 1 16