Review Questions

graphics/rq_icon.gif

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()



     
    ASPTreeView.com
     
    Evaluation has ИВЩДГexpired.
    Info...