When you compile your code the compiler tells you all the compilation errors. You just have to go one by one and fix them up.
I did it quickly for you and the "fixed" code is below. I say it's "fixed" because I only tested if the code runs and did not have time to validate if it's doing the right thing.
Your code had many syntax errors, missing braces, redeclared variables, variables declared in the wrong scope, typos and many other problems.
Please, see the "fixed" code here:
import java.util.Arrays;
import java.util.Scanner;
public class Main
{
private int[] list = new int[100];
private int count = 0;
public static void main(String[ ] args)
{
Main lab = new Main();
lab.input(); // Read from datafile
lab.process(); // Sort the array
lab.output( ); // Display output
}
public void input()
{
Scanner reader = new Scanner(numberString);
reader.useDelimiter("/");
while (reader.hasNextInt())
{
list[count++] = reader.nextInt();
}
}
public void process()
{
Arrays.sort(list, 0, count);
}
public void output()
{
System.out.println("all the numbers in order:");
int negative = 0;
for (int i = 0; i < count; i++)
{
System.out.println(list[i] + " ");
System.out.println();
System.out.println("printing all the negative numbers:");
for(int j = 0; j < count; j++)
{
negative++;
System.out.println(list[j] + " ");
}
}
int pos = 0;
System.out.println("\nprinting all the postive numbers:");
for (int i = 0; i < count; i++)
{
if (list[i] > 0)
{
pos++;
System.out.println(list[i] + " ");
}
}
System.out.println("\nthere were " + negative + " negative numbers and " + pos + " postive numbers ");
}
private static String numberString = "-68/-66/78/77/-64/-63/-62/-61/-60/-22/39/-20/38/43/42/-26/41/-69/-55/-54/69/68/-50/-12/-13/25/28/3/2/1/7/-14/6/32/-17/4/70/9/71/8/-59/59/56/55/-41/17/18/15/-45/12/-48/65/60/-72/48/-74/-76/44/47/-78/46/-30/-31/-32/-35/-37/-36/-39/10/-38/-2/-4/-6/51/53/-8/-9/50/92";
public void output2()
{
int n = 65;
System.out.println("searching the list for " + n);
int index = Arrays.binarySearch(list, n);
if (index < 0)
System.out.println(n + " was not in list");
else
System.out.println();
}
}