Posted by : Unknown Thursday, 18 June 2015

import javax.swing.JOptionPane;
public class dialog 
{
public static void main( String args[] )
    {
String name =JOptionPane.showInputDialog( "What is your name?" );
String message =String.format( "Welcome, %s, to Java Programming!", name );
JOptionPane.showMessageDialog( null, message );
    }
}

Output:

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Translate

Popular Post

Total Pageviews

Blog Archive

- Copyright © Learning Java Program - Powered by Blogger -