Java Java Objects Meet Objects Access Level Modifiers

Andrew Minai
Andrew Minai
513 Points

I dont know why I cant get my code to compile? error: cannot find symbol

Example.java:8: error: cannot find symbol
PezDispenser dispenser = new PezDispen

1 Answer

Priyajot Syan
PRO
Priyajot Syan
Pro Student 2,642 Points

PezDispenser dispenser = new PezDispen

If you are following the video, object creation should be

new PezDispenser();

And also read the error "PezDispen", Compiler is complaining that it cant find the symbol because there is none

Andrew Minai
Andrew Minai
513 Points

Thank you so much I really appreciate it!