public means you can access it from any other class, classes are objects that have different attributes like using strings, int, boolean and double for example, you have public class CarBrands{ // This is your public class it has public class, the object and the name of the object.
When you open up and eclipse it will always start with a public class HelloWorld.