Sunday 25 September 2016

Pop Ups in JAVA

import javax.swing.JOptionPane;
public class stringvar
{
public static void main(String args[])
{
String fn,fn2,fn3;      
fn = JOptionPane.showInputDialog("Enter your first name");
fn2= JOptionPane.showInputDialog("Enter your family name");

fn3 = "You are "+ fn+" "+fn2;
JOptionPane.showMessageDialog(null,fn3);
}
}






No comments:

Post a Comment