O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java Is Object-Oriented from the Ground Up

We first got a look at object-oriented programming when working with JavaScript, but that was only a quick glance. Object-oriented programming is integral to every aspect of Java. For example, take a look at the application we just saw:

public class ch10_01 
{
    public static void main(String[] args)
    {
        System.out.println("Welcome to Java");
    }
}

Note the very first line, public class ch10_01, which defines a class named ch10_01. Our whole program is based on that class because, unlike in JavaScript, every line of code you write in Java has to be contained in a class (or an interface, which is a more generalized form of classes that we'll see in the next chapter). When Java runs this application, it creates ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required