package dk.dtu.brainfuckcomp;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Brainfuck bf = new Brainfuck(7);
		
		String str;
		Scanner sc = new Scanner(System.in);
		
        System.out.println("Enter Brainfuck (Leave blank for \"Hello World!\"):");
		str = sc.nextLine();
		if (str.equals("")) {
			str = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";
		}
		
		sc.close();
				
		try {
			bf.parse(str);
		} catch (UnknownSymbolExeption e) {
			e.printStackTrace();
		}
		
		System.out.println(bf.toString());
		
		
	}
	
	
	
}

package dk.dtu.brainfuckcomp;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int n;
		if (args.length == 0) {
			System.out.println("Length of Brainfuck array not specified. Defaulting to 8.");
			n = 8;
		} else {
			n = Integer.parseInt(args[0]);
		}
		
		Brainfuck bf = new Brainfuck(n);
		Scanner sc = new Scanner(System.in);
		
        System.out.println("Enter Brainfuck (Leave blank for \"Hello World!\"):");
        String str = sc.nextLine();
		if (str.equals("")) {
			str = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";
		}
		sc.close();
				
		try {
			bf.parse(str);
		} catch (UnknownSymbolExeption e) {
			e.printStackTrace();
		}
		
		System.out.println(bf.toString());		
	}
}

Add dynamic changable brainfuck arraylength
Add dynamic changable brainfuck arraylength
