HelloWorld.java is a good enough example of OO programming from the Java perspective but only if it is presented properly. The biggest problem isn't the example, it's the approach used to explain the example.
To present this example an non-OO:
public class HelloWorld {
public static void main( String [] args) {
System.out.println("Hello, world.");
} }
where clearly from a Java standpoint we have several objects and methods staring back at us is totally incorrect. Perhaps the approach should be to explain from day one why this is considered non-OO and then present an improved example of "good" OO as a contrast. Then, I think the instructors/writers are getting somewhere.
HelloWorld.java is a good enough example of OO programming from the Java perspective but only if it is presented properly. The biggest problem isn't the example, it's the approach used to explain the example.
To present this example an non-OO:
public class HelloWorld {
public static void main( String [] args) {
System.out.println("Hello, world.");
}
}
where clearly from a Java standpoint we have several objects and methods staring back at us is totally incorrect. Perhaps the approach should be to explain from day one why this is considered non-OO and then present an improved example of "good" OO as a contrast. Then, I think the instructors/writers are getting somewhere.
We're the "O" in O/S.
Damn the O-Rings, full speed ahead!