January 2003
Beginner to intermediate
1200 pages
23h 42m
English
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 ...