//convert to java from python
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;

class memorization{
    private static ArrayList<String> read_lines(String fname){
	ArrayList<String> return_string = new ArrayList<String>();
	try{
	    BufferedReader br = new BufferedReader(new FileReader(fname));
	    String line = null;
	    while((line = br.readLine()) != null){
		//System.out.println(line);
		return_string.add(line);
	    }
	    br.close();
	}
	catch(Exception e){
	    e.printStackTrace();
	}
	return return_string;
    }

    public static void main(String[] args){
	//System.out.println("hello world");
	ArrayList<String> temp = read_lines("hamlet.txt");
	System.out.println(temp);
    }
}

@@ -113,28 +113,111 @@
 st;%0A
-%0Aclass memorization%7B
+import java.util.Scanner;%0A%0Aclass memorization%7B%0A    //Reads in file and separates into ArrayList by line
 %0A   
@@ -642,16 +642,394 @@
 ;%0A    %7D%0A
+    private String check(String guess, String accept)%7B%0A%09%0A    %7D%0A    private void game(String fname)%7B%0A%09ArrayList%3CString%3E lines = read_lines(fname);%0A%09int line_counter = 0;%0A%09Scanner in = new Scanner(System.in);%0A%09while(line_counter %3C= lines.size())%7B%0A%09    if(line_counter == 0)%7B%0A%09%09guess = in.next();%0A%09%09if(guess.replaceAll('%5B%5Ea-zA-Z0-9%5D', %22%22) == %0A%09    %7D%0A%09    else%7B%0A%09     %0A%09    %7D%0A    %7D%09
 %0A    pub

update java file