Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Review Questions

1.8Which command from the JDK should be used to compile the following source code contained in a file named 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.9Which command from the JDK 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()


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint