Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get input in java using joptionpane

import javax.swing.JOptionPane;

public class Sample {
    public static void main(String[] args) {
        String name = "";
        name = JOptionPane.showInputDialog("Please Enter your name");
        String msg = "Hello " + name + "!";
        JOptionPane.showMessageDialog(null, msg);
    }
}
 
PREVIOUS NEXT
Tagged: #input #java #joptionpane
ADD COMMENT
Topic
Name
2+7 =