at first i think your way is not so good and it is better to save usernames and passwords in the same file. but with this code you can read the lines of file:
try{
File file = new File("type your address"); FileReader reader = new FileReader(file); bufferedReader = new BufferedReader(reader); String currentLine; while((currentLine = bufferedReader.readLine()) != null){ //in this loop you can access to lines of file by currenLine variable }
}catch(Exception IOException){
}finally{
bufferedReader.close();
}