package com.alkathirikhalid.util;

import java.io.IOException;

/**
 * @author Al-Kathiri Khalid
 * www.alkathirikhalid.com
 * Test application
 */
public class Application {

	public static void main(String[] args) throws IOException {
		// Clear history in memory
		History.clearHistory();
		
		// Loads history from file
		Writer.read();
		
		// Add items to history list in memory
		History.addHistory("1");
		History.addHistory("2");
		
		// Print new history list in memory
		for (String string : History.getHistory()) {
			System.out.println(string);
		}
		
		// Print history size list in memory
		System.out.print(History.sizeOfHistory());
		
		// Saves new history to file
		Writer.write();

	}
}

@@ -292,53 +292,236 @@
 %0A%09%09%0A
-%09%09// Loads history from file%0A%09%09Writer.read();
+            try %7B%0A            %09// Loads history from file%0A                Writer.read();%0A            %7D catch (FileNotFoundException e)%7B%0A            %09// If file not found then create%0A                Writer.write();%0A            %09%7D
 %0A%09%09%0A

Handle FileNotFound Exception