Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Quizzes

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
Print Button
 
Quizzes Index

Essentials of the JavaTM Programming Language Quiz

by Dana Nourie and Monica Pawlan

January 2000

Duke Essentials of the JavaTM Programming Language is a great resource to launch a comprehensive study of the Java programming language, or to explore other features on the Java platform. Take this short quiz to test your knowledge of Lessons 1 through 5.


  1. A program written in the JavaTM programming language can run on any platform because...
     A. Java programming is derived from C++.
     B. The Java Virtual Machine1(JVM) interprets the program for the native operating system.
     C. The compiler is identical to a C++ compiler.
     D. The APIs do all the work.

  2. An applet will run in almost any browser because...
     A. The server has a built-in JVM.
     B. The browser has a built-in JVM.
     C. The source code is interpreted by the browser.
     D. Applets don't need a JVM.

  3. What is the purpose of the main method?
     A. To build a user interface.
     B. To hold the APIs of the application.
     C. To create buttons and scrollbars.
     D. To act as the entry point for the program.

  4. The Applet class provides...
     A. A browser to run the applet.
     B. Methods to define the applet's behavior and appearance.
     C. A special HTML page.
     D. Permission to communicate with the server.

  5. Which method will a web browser call first on a new applet?
     A. main method
     B. start method.
     C. init method.
     D. paint method.

  6. What is the advantage of using import statements?
     A. To avoid having to declare variables.
     B. To refer to a class without using prefixes.
     C. To avoid calling methods.
     D. To import the images you want to use.

  7. When a program class implements an interface, it must provide behavior for...
     A. Two methods defined in that interface.
     B. Only certain methods in an interface.
     C. Any methods in a class.
     D. All methods defined in that interface.

  8. A constructor is used to...
     A. Free memory.
     B. Initialize a newly created object.
     C. Import packages.
     D. Create a JVM for applets.

  9. The BorderLayout class provides static fields for...
     A. Introducing new methods.
     B. Adding components to specific areas of a container.
     C. Starting an applet.
     D. Specifying font size and color.

  10. Servlets are typically used for...
     A. Creating graphics.
     B. Extending a web server by providing dynamic web content.
     C. Storing information in applets.
     D. Loading buttons and menus.

_______
1 As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.


Print Button
[ This page was updated: 27-Sep-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary | Feedback | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.