Visual Basic and Java Fundamentals

Quiz covering Visual Basic controls and message boxes, plus Java applets, JVM, servlets, interfaces, and GUI programming concepts

20 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.
Question 15 Multiple Choice (Single Answer)

What is tool tip text

  1. Tool tip text is the same as the caption
  2. Tool tip text is a tip of the day
  3. Tool tip text is shown when the mouse is held over a object for a period of time
  4. Tool tip text does not exist
Question 16 Multiple Choice (Single Answer)

What is the purpose of the name function in all controls?

  1. they can be sorted by type
  2. they can be called at runtime
  3. name functions does not exist
  4. they can be sorted by value
Question 17 Multiple Choice (Single Answer)

How many types of message boxes are there in VB?

  1. 8
  2. 7
  3. 6
  4. 5
Question 18 Multiple Choice (Single Answer)

Which of these is not an vaild messagebox in VB?

  1. vbOKonly
  2. vbExitOnly
  3. vbRetryCancel
  4. vbAbortRetryIgnore
Question 19 Multiple Choice (Single Answer)

A control array is a list of controls with?

  1. Different names
  2. Same name
  3. Both 1 and 2
  4. None of these
Question 20 Multiple Choice (Single Answer)

What is the name of the bar where you would see a Categorized view or a Alphabetic View ?

  1. Project Properties Window
  2. Tool Bar
  3. Tool Box window
  4. Project explorer