Opening Statements & Packages

Opening statement for java document

Opening Statement
public static void main(String[] args) {}

Import Packages

Assign variables
import java.util.Scanner // Input user data
  Scanner userInput = new Scanner(System.in); // set variable "userInput" in Scanner
    Variable1 = userInput.next(); // Set Variable1 to the user input data as a string
    Variable2 = userInput.nextInt(); // Set Variable1 to the user input data as an Integer
    Variable3 = userInput.nextDouble(); // Set Variable1 to the user input data as a Double
Random Numbers
import java.util.Random;
  Random r = new Random();
  int x = 1 + r.nextInt(10);
  // Pick a random number from 1 to 10 (inclusive) and store it into the variable x
  // Note: Numbers start at the front number and go x digits above the start number based on the number in parenthesis.  If no number is present, the number 0 will be the starting point.
  //Random r = new Random(12355); // The "122355" is a "seed" It's unclear what this does however the numbers appear to remain stagnant after they are randomized regardless of the seed.....
Dialog box to add user variables???
// ** Need to verify accuracy of below
  import javax.swing.*
  String variable = JOptionPane.showInputDialog("Option pane statement"); // name automatically assigned to input
    String input = JOptionPane.showInputDialog("Input integer");
    int variable = Integer.parseInt(input); //parse integer from string

Notes:
import java.util.StringTokenizer;