Java Programming Fundamentals

Test your knowledge of core Java programming concepts including applets, JVM, interfaces, servlets, and basic Java syntax.

14 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the advantage of using import statements?

  1. To avoid having to declare variables.
  2. To refer to a class without using prefixes.
  3. To avoid calling methods.
  4. To import the images you want to use.
Question 2 Multiple Choice (Single Answer)

An applet will run in almost any browser because...

  1. The server has a built-in JVM.
  2. The browser has a built-in JVM.
  3. The source code is interpreted by the browser.
  4. Applets don''t need a JVM.
Question 3 Multiple Choice (Single Answer)

The BorderLayout class provides static fields for...

  1. Introducing new methods.
  2. Adding components to specific areas of a container.
  3. Starting an applet.
  4. Specifying font size and color.
Question 4 Multiple Choice (Single Answer)

Java runs on _______.

  1. Windows
  2. Unix/Linux
  3. Macs
  4. All of the Above
Question 5 Multiple Choice (Single Answer)

What is Java?

  1. A type of coffee
  2. An object-oriented programming language
  3. A Structured Programming language
  4. An interactive website
Question 6 Multiple Choice (Single Answer)

Which method will a web browser call first on a new applet?

  1. main method.
  2. start method.
  3. init method.
  4. run method
Question 7 Multiple Choice (Single Answer)

What is an Applet?

  1. An interactive website
  2. A Java program that is run through a web browser
  3. A type of computer
  4. Java method
Question 8 Multiple Choice (Single Answer)

A program written in the Java programming language can run on any platform because...

  1. Java programming is derived from C++.
  2. The compiler is identical to a C++ compiler.
  3. The APIs do all the work.
  4. The Java Virtual Machine(JVM) interprets the program for the native operating system.
Question 9 Multiple Choice (Single Answer)

Servlets are typically used for...

  1. Extending a web server by providing dynamic web content.
  2. Create a JVM for applets.
  3. Storing information in applets.
  4. Loading buttons and menus.
Question 10 Multiple Choice (Single Answer)

When a program class implements an interface, it must provide behavior for...

  1. Two methods defined in that interface.
  2. All methods defined in that interface.
  3. Only certain methods in an interface.
  4. Any methods in a class.
Question 11 Multiple Choice (Single Answer)

Servlets are typically used for...

  1. Create a JVM for applets.
  2. Extending a web server by providing dynamic web content.
  3. Storing information in applets.
  4. Loading buttons and menus.
Question 12 Multiple Choice (Single Answer)

When a program class implements an interface, it must provide behavior for...

  1. Two methods defined in that interface.
  2. Only certain methods in an interface.
  3. All methods defined in that interface.
  4. Any methods in a class.
Question 13 Multiple Choice (Single Answer)

A program written in the Java programming language can run on any platform because...

  1. Java programming is derived from C++.
  2. The Java Virtual Machine(JVM) interprets the program for the native operating system.
  3. The compiler is identical to a C++ compiler.
  4. The APIs do all the work.
Question 14 Multiple Choice (Single Answer)

An applet will run in almost any browser because...

  1. The server has a built-in JVM.
  2. The browser has a built-in JVM.
  3. The source code is interpreted by the browser.
  4. Applets don''t need a JVM.