Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Objects Meet Objects Creating Classes

Niek Schoonderbeek
Niek Schoonderbeek
530 Points

can not find symbol

I watched the video and followed Greg in workspaces but I don't know what I missed here?

First folder:

class PezDispenser { String CharacterName = "Yoda"; }

Second folder:

public class Example {

public static void main(String[] args) { // Your amazing code goes here...

System.out.printIn("we maken een nieuwe PEZ Dispenser");
PezDispenser dispenser = new PezDispenser();
System.out.printf("the dispenser is %s %n",
                  dispenser.characterName);

} }

Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
Example.java:7: error: cannot find symbol
System.out.printIn("we maken een nieuwe PEZ Dispenser"); ^
symbol: method printIn(String)
location: variable out of type PrintStream
Example.java:10: error: cannot find symbol
dispenser.characterName);
^
symbol: variable characterName
location: variable dispenser of type PezDispenser

1 Answer

Yanuar Prakoso
Yanuar Prakoso
15,196 Points

Hi there

You just make a small mistake in typing:

System.out.printIn/*<--this is the problem*/("we maken een nieuwe PEZ Dispenser");

it should be:

System.out.println("we maken een nieuwe PEZ Dispenser");

You type printIn using capital i letter. It should have been println with an l. I hope this will help

Niek Schoonderbeek
Niek Schoonderbeek
530 Points

yes it helped, thanks for the help and your fast response!