Take it!

Code: Java
public class Reader {
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new FileReader("file.txt"));

            List uniqueLines = new ArrayList();
            String line;
            while ((line = br.readLine()) != null) {
                if (!uniqueLines.contains(line)) {
                    uniqueLines.add(line);
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Last edited by SaswatPadhi; 8Nov2009 at 18:03.. Reason: Changed PHP tag to CODE tag