O'Reilly logo

Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition by Rolf W. Rasmussen, Khalid A. Mughal

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

Review Questions

1.8 What command in the Java 2 SDK should be used to compile the following code contained in a file called SmallProg.java?
public class SmallProg {
    public static void main(String[] args) { System.out.println("Good luck!"); }
}

Select the one correct answer.

  1. java SmallProg

  2. javac SmallProg

  3. java SmallProg.java

  4. javac SmallProg.java

  5. java SmallProg main

1.9 What command in the Java 2 SDK should be used to execute the main() method of a class named SmallProg?

Select the one correct answer.

  1. java SmallProg

  2. javac SmallProg

  3. java SmallProg.java

  4. java SmallProg.class

  5. java SmallProg.main()

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