FileReader readKGN = new FileReader("KGNLibrary.txt");

                int KGNLib =; 


i dunwan read it as int.. because i wan use it on IF, so i need it to compare wat i input string item into text area with text file inside string item.

if (POS[i].equals(KGNLib))
                jTextArea2.append((POS[i] + "/KK" + " | "));

Read the API docs for FileReader and see if some other method there is better.

Or wrap it in a BufferedReader, then read the API docs for BufferedReader and see if there is yeat another method there that is even better for your purposes.

You can use commons io (, like this:


Java is not a superior language itself, but it has a lot of great external libraries.