Just remember that these are small methods, requiring only a few lines of code. In Java, like most things, simple is better. This method would just return favoriteCandyCount. This is needed because the instance variables are required to be private. A constructor should also be used.
Constructors are like a method but are used to initialize the object.
For some objects where all objects start off with the same values, it would be possible to get the same effect by simply putting the correct values in the class variables when they are declared. But this has the downfall of not guaranteeing correct initialization if that method is forgotten to be called. Our objects do not start off all the same because they each have a different favorite candy. For this reason, we are requiring the use of a constructor. All you need to do is to put the correct data into the instance variables.