Java Programming Language Quiz - 3

Java Programming Language Quiz - 3

5 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

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
Question 2 Multiple Choice (Single Answer)

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
Question 3 Multiple Choice (Single Answer)

Can a for statement loop indefintely?

  1. Yes
  2. No
Question 4 Multiple Choice (Single Answer)

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
Question 5 Multiple Choice (Single Answer)

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