Java Java Objects Harnessing the Power of Objects Filling the Dispenser

Adam Stenning
Adam Stenning
6,809 Points

"Undeclared but Uninitialized".

When Craig is setting the PezCount to store how many many Pez are in the dispenser, he says "So for now, let's just leave this undeclared but uninitialized", (0:49).

What does he mean by this?

Many thanks,

1 Answer

adrian miranda
adrian miranda
13,122 Points

I think he meant to say "declared but uninitialized". He had declared it:

private int pezCount;

But he didn't bother to set a value. So, it is still uninitialized.