Thanks for the explanation could you please explain once again in detail
(if you didn't have the javadoc or source) you can't tell the difference between a constant declared in an interface and a class.
Just saying that you access the constants in the Car interface the same way you'd access them if Car was a class. Both ways it's still Car.NUM_WHEELS.
I don't do constants in an interface normally either. It seems to me a bad idea to put implementation details such as data into a class that describes a behavior contract. In the example, what if I wanted to make a ThreeWheeledCar? It would still implement the behavior, drive() but the constants would get in the way. At least if you do it in an abstract class you have the option to use the abstract class when doing the implementation, or you could implement the interface directly and create your own constants.