Skip to content

Instantly share code, notes, and snippets.

JayadevSenapathi

Block or report user

Report or block JayadevSenapathi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JayadevSenapathi
JayadevSenapathi / GUIInput.java
Created Sep 11, 2017
A sample Java program using GUI with javax.swing package.
View GUIInput.java
import javax.swing.*;
public class GUIInput {
public static void main(String[] args) {
String name = JOptionPane.showInputDialog("What's your name?");
String ageString = JOptionPane.showInputDialog("What's your age?");
int age = Integer.valueOf(ageString);
System.out.print("Hello " + name);
System.out.println("You are going to be " + (age + 1) + " next year");
}
}
You can’t perform that action at this time.