The application is meant to ask for 10 numbers and print out the highest, here is what I have been able to do:
Code:import java.io.*;
public class ArrayExample
{
static BufferedReader kbRead = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException
{
int numNames = getInt("Number of names? ");
String[] names = new String[numNames];
for (int i = 0; i < names.length; i++)
{
names[i] = getString("Enter name #" + i);
}
for (int i = 0; i < names.length; ++i)
{
System.out.println(names[i]);
}
}
public static int getInt(String prompt) throws IOException
{
System.out.print(prompt + " ");
return Integer.parseInt(kbRead.readLine());
}
public static String getString(String prompt) throws IOException
{
System.out.print(prompt + "The highest number is" + numNames);
return kbRead.readLine();
}
}

