3 Replies - 217 Views - Last Post: 03 August 2013 - 12:58 PM Rate Topic: -----

#1 streek405  Icon User is offline

  • D.I.C Addict

Reputation: 10
  • View blog
  • Posts: 547
  • Joined: 10-March 13

cannot find symbol, but already declared...

Posted 03 August 2013 - 12:45 PM

Im getting the cannot find symbol error for lines 43-49, but I already declared it in the beginning...


class Frappuccinos{

		String a1;
		String a2;
		String a3;
		String a4;
		String a5;
		String a6;
		String a7;
		String exit = "exit";

	//ingredients
	String caffeVanilla2 = "milk, coffee, ice, vanilla bean powder, whipped cream";
	String caramel2 = "milk, coffee, ice, caramel syrup, whipped cream, and caramel sauce";
	String crc2 = "caramel, milk, ice, dark caramel sauce, whipped cream, caramel drizzle, and crunchy sugar";
	
	//list of fraps
	boolean caffeVanilla = false;
	boolean caramel = false;
	boolean caramelRibbonCrunch = false;
	
	
	//constructor
	Frappuccinos(){
	}
	
	//make them available with ingredients or not
	public void yesCaffeVanilla(){
		caffeVanilla = true;
		System.out.println("The caffe vanilla contains: " + caffeVanilla2);
	}
	//DO SOMETHING WITH THIS
	public void customCV(){
		caffeVanilla = true;
		System.out.println("So you want a custom caffe vanilla...you hipster! \nWhat would you like in it? Enter each item followed by pressing ENTER," +
		" type in exit when you're done: ");
		
		//end the program if they enter exit
		if (a1.equals(exit) || a2.equals(exit) || a3.equals(exit) || a4.equals(exit) || a5.equals(exit) || a6.equals(exit) || a7.equals(exit)){
			System.out.println("You are finshed with your order");
			//actually make it end
		}
			a1 = input.nextLine();
			a2 = input.nextLine();
			a3 = input.nextLine();
			a4 = input.nextLine();
			a5 = input.nextLine();
			a6 = input.nextLine();
			a7 = input.nextLine();

		
		
		
	}





Is This A Good Question/Topic? 0
  • +

Replies To: cannot find symbol, but already declared...

#2 GregBrannon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2198
  • View blog
  • Posts: 5,226
  • Joined: 10-September 10

Re: cannot find symbol, but already declared...

Posted 03 August 2013 - 12:50 PM

I don't see 'input' declared in what you posted. Where is it?
Was This Post Helpful? 1
  • +
  • -

#3 schutzzz  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 136
  • View blog
  • Posts: 338
  • Joined: 22-April 13

Re: cannot find symbol, but already declared...

Posted 03 August 2013 - 12:51 PM

Edit: Misread brackets

But for your strings equaling exit, you should have it equalsIgnoreCase instead.

This post has been edited by schutzzz: 03 August 2013 - 01:00 PM

Was This Post Helpful? 0
  • +
  • -

#4 streek405  Icon User is offline

  • D.I.C Addict

Reputation: 10
  • View blog
  • Posts: 547
  • Joined: 10-March 13

Re: cannot find symbol, but already declared...

Posted 03 August 2013 - 12:58 PM

View PostGregBrannon, on 03 August 2013 - 12:50 PM, said:

I don't see 'input' declared in what you posted. Where is it?

omg the Scanner! Thanks! This was separate class and I thought that I only had to state the Scanner once. >.<
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1