Object Creation
Consider why the following code will not compile:
public class Test {
public void sayHello() {
System.out.println (“Hello”);
}
public static void main (String arg[]) {
sayHello(); // WRONG!
}
}
Previous slide
Next slide
Back to first slide
View graphic version