/*
 * File: BadScopeExample2.java
 * ---------------------
 * In this example, trueLove is in the wrong scope!
 * How can we fix it?
 */

import acm.program.*;

public class BadScopeExample2 extends ConsoleProgram {
	public void run() {
		int romeo = 18;
		findRomance(romeo);
		// Oh no! trueLove is only defined inside of findRomance!
		// We can't print out their trueLove!
		println(trueLove);
	}
	
	private void findRomance(int r) {
		int juliet = 13;
		
		int trueLove = r + juliet;
	}
}

