Let's look at our original Hello World program:

public class Hello {
     public static void main(string[] args) {
          System.out.println("Hello world!");

When it says public class Hello, it is declaring that this class is declared public, which means it can be accessed by other classes, and it gives it a name, so that other classes can use it. Now then, Let's look at how everything in java is made up.


The class file is what makes everything in java. Everything in java is a class file. There is a class file called Object. Every java class is sub classed from that Object class. What is this sub class thing? If you where to look at all of the class files that make up java, you could form a tree of all of the classes, where the Object class would be the root class.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License