Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java

Joshua Walczak
Joshua Walczak
10,854 Points

I cannot find my error, can anyone help?

This is the error I keep getting when trying to run Karaoke.java

symbol: class KaraokeMachine
location: class Karaoke
Karaoke.java:9: error: cannot find symbol
KaraokeMachine machine = new KaraokeMachine(songBook);
^
symbol: class KaraokeMachine
location: class Karaoke
3 errors

Here are the snapshots of my work space

https://w.trhou.se/a99w02r5yw

4 Answers

Yanuar Prakoso
Yanuar Prakoso
15,195 Points

Hi Joshua

From your snapshot I learned that you have mistake in naming your KaraokeMachine java file. You name it KarokeMachine.java instead of KaraokeMachine.java. Therefore when you call new KaraokeMachine() from your Karaoke class the compiler cannot find it and failed to compile it. Please rename it to KaraokeMachine.java and you will be okay.

I hope this can help a little.

This is the right answer.

Joshua Walczak
Joshua Walczak
10,854 Points

I fixed the typo and renamed the file but now i am getting this error

javac: file not found: KaraokeMachine.java
Usage: javac <options> <source files>
use -help for a list of possible options

Joshua Walczak
Joshua Walczak
10,854 Points

and now this

unreported exception IOException; must be caught or declared to be thrown

every error i fix, seems to reveal more :(

Yanuar Prakoso
Yanuar Prakoso
15,195 Points

can you give me the link to your workspace?

Joshua Walczak
Joshua Walczak
10,854 Points

i fixed it. i somehow missed a "throws IOException" after "promptAction"

thank you all for your help and insight