Alien head

Java Programming Language Quiz - 3

Description: Java Programming Language Quiz - 3
Number of Questions: 5
Created by:
Tags: java

What are the programming constructs?

  1. Sequential

  2. Selection -- if and switch statements

  3. Iteration -- for loop, while loop and do-while loop

  4. none of the above

Answer: 1

What is output of the above program?

class conditional {
 public static void main(String args[]) {
   int i = 20;
   int j = 55;
   int z = 0;
   z = i < j ? i : j; // ternary operator
   System.out.println("The value assigned is " + z);
  1. The value assigned is 20

  2. The value assigned is 60

  3. The value assigned is 30

  4. The value assigned is 50

  5. The value assigned is 40

Answer: 1

Can a for statement loop indefintely?

  1. Yes

  2. No

Answer: 1

What is a thin-client application?

  1. A browser that uses a plug-in to process user data.

  2. A distributed application where the client program does not process datA. but instead passes data for processing to an enterprise bean running on an application server.

  3. An application that cannot be stopped by a firewall.

  4. An application compiled with the -thin option of the javac command

Answer: 2

What is a J2EE component?

  1. Special icons for creating the user interface elements for thin clients.

  2. A data module saved to the component area of the database.

  3. A self-contained functional software unit that is assembled into a J2EE application and interfaces with other application components

  4. A JAR file

Answer: 3
+ View questions