illegal start of expression
public class store
{
public static void main(String[] args)
{
String dataInput;
import javax.swing.*;
dataInput = JOptionPane.showInputDialog(null, "Input item data: ");
JOptionPane.showMessageDialog(null, "" + dataInput);
EasyReader console = new EasyReader();
int i, j, k, inum, icom, min, nswaps; inum = 0; boolean swap = false;
double num[] = new double[100]; double dsum, T;
do
{
System.out.println(); System.out.println("Command Menu"); System.out.println();
System.out.println("1 = Display the data");
System.out.println("2 = Bubble Sort the numbers");
System.out.println("3 = Selection Sort the numbers");
System.out.println("4 = Insertion Sort the numbers");
System.out.println("5 = Binary Search for a number");
System.out.println("0 = Exit the program"); System.out.println();
System.out.print("Enter Command - ");
icom = console.readInt(); System.out.println();
switch (icom)
{
case 1: // Display the data
Display(inum, num);
break;
case 2: // Bubble sort
nswaps = 0;
for (i = 0; i < (inum-1); i++ )
{
for (j = (i+1); j < inum; j++)
{
if (num > num[j])
{
T = num;
num = num[j];
num[j] = T;
nswaps++;
}
}
}
System.out.println("The number of swaps was - " + nswaps);
Display(inum, num);
break;
case 3: // Selection sort
nswaps = 0;
for (i = 0; i < inum - 1; i++) {
min = i; swap = false;
for (j = i + 1; j < inum; j++)
{
if (num[j] < num[min]) { min = j; swap = true; }
}
if (swap) {T = num[min];
num[min] = num;
num = T;
nswaps++;}
}
System.out.println("The number of swaps was - " + nswaps);
Display(inum, num);
break;
case 4: // Selection sort
nswaps = 0;
for (i = 1; i < inum; i++)
{
j = i; T = num;
while ((j > 0) && (T < num[j-1]))
{
num[j] = num[j-1]; j--; nswaps++;
}
num[j] = T; nswaps++;
}
System.out.println("The number of swaps was - " + nswaps);
Display(inum, num);
break;
case 5: // Binary Search
System.out.println("Your numbers will be sorted first");
System.out.println();
for (i = 1; i < inum; i++)
{
j = i; T = num;
while ((j > 0) && (T < num[j-1]))
{
num[j] = num[j-1]; j--;
}
num[j] = T;
}
System.out.print("Enter the number to locate - ");
T = console.readDouble(); nswaps = 0; System.out.println();
int left = 0, right = inum, middle; k = -1;
while (left <= right)
{
middle = (left + right) / 2;
if (T > num[middle]) {left = middle + 1; nswaps++;}
else if (T < num[middle]) {right = middle - 1; nswaps++;}
else { k = middle; break; }
}
if (k == -1) System.out.println("Your number was not located in the array");
else System.out.println("Your number " + T + " is in position " + (k+1));
System.out.println();
System.out.println(nswaps + " comparisons were needed to search for your number");
Display(inum, num);
break;
}
} while (icom != 0);
}
public static void Display(int inum, double num[])
{ int k;
System.out.println();
System.out.println("");
System.out.println();
for (k = 0; k < inum; k++)
{
System.out.println((k+1) + " - " + num[k]);
}
return;
}
}
I am trying to get this program to compile but in Line 7: ( import javax.swing.*; ) an illegal start of expression comes up. I do not know if the error is somewhere else in my program or if it is a function of my JCreator. This is the only error that comes up when I compile it. I would appreciate any help.

