Hi, i'm getting this error in textpad whenever I compile my program.
error: Class names, 'uncheked', are only accepted if annotation processing is explicitly requested
/*
Chris#02
Date: 12/6/2011
Description: Lesson 25 project
*/
import java.util.*;
import java.io.*;
class AlphNames
{
public static void main( String args[ ] ) throws IOException
{
System.out.println("Chris #02\n");
Scanner sf = new Scanner(new File("U:\\My Documents\\Computer Science I - Student Folders\\Lesson25\\Names.in"));
int maxIndx = -1;
String text[] = new String[1000];
while(sf.hasNext())
{
maxIndx++;
text[maxIndx] = sf.nextLine();
//System.out.println(text[maxIndx]);//for testing
}
String reversedNames[] = new String [maxIndx+1];
for(int x=0; x<=maxIndx; x++)
{
Scanner sc = new Scanner(text[x]);
String fN = sc.next(), lN = sc.next();
reversedNames[x] = lN + ", " +fN;
}
Arrays.sort(reversedNames);
for(int x=0; x<=maxIndx; x++)
System.out.println(reversedNames[x]);
}// end of main()
}//end of class
I'm not sure why I am getting this error. I saved this as AlphNames.java, but i'm still getting the error.
Class names error
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm