import java.io.*;
public class inout{
public static void main (String[] args){
int a;
BufferedReader num= new BufferedReader(new InputStreamReader(System.in));
try
{System.out.println("Enter a number: ");
a = integer.parseInt(num.readLine());
System.out.println("THE NUMBER IS" + a);
}
catch(IOException e)
{System.out.println("ERROR");
{}}
import javax.swing.*;
public class jopt{
public static void main(String[]args){
int x;
x = Integer.parseInt(JOptionPane.showInputDialog("enter a number"));
JOptionPane.showMessageDialog(null, "the number is " + x, result", JOptionPane.INFORMATION_MESSAGE);
}}