Java Programming Language Quiz - 3
Java Programming Language Quiz - 3
Questions
Question 1 Multiple Choice (Single Answer)
What are the programming constructs?
- Sequential
- Selection -- if and switch statements
- Iteration -- for loop, while loop and do-while loop
- 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);
}
}
- The value assigned is 20
- The value assigned is 60
- The value assigned is 30
- The value assigned is 50
- The value assigned is 40
Question 3 Multiple Choice (Single Answer)
Can a for statement loop indefintely?
- Yes
- No
Question 4 Multiple Choice (Single Answer)
What is a thin-client application?
- A browser that uses a plug-in to process user data.
- 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.
- An application that cannot be stopped by a firewall.
- An application compiled with the -thin option of the javac command
Question 5 Multiple Choice (Single Answer)
What is a J2EE component?
- Special icons for creating the user interface elements for thin clients.
- A data module saved to the component area of the database.
- A self-contained functional software unit that is assembled into a J2EE application and interfaces with other application components
- A JAR file