Java and J2EE Programming

Test your knowledge of Java programming fundamentals including OOP concepts, threads, garbage collection, and J2EE web development with JSP, servlets, and MVC architecture.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What are container services?

  1. Life cycle management
  2. Security
  3. Deployment
  4. All the above
Question 2 Multiple Choice (Single Answer)

What are the components of a web module? (a) JSP (b) JAVA (c)html (d)Deployment descriptors

  1. (a) and (b)
  2. (a), (b) and (c )
  3. (c )
  4. All the above
Question 3 Multiple Choice (Single Answer)

What is HashMap and Map? Answer in order

  1. Interface and Class
  2. Class and Interface
  3. interface and interface
  4. class and class
Question 4 Multiple Choice (Single Answer)

Which class cant have explicit constructors?

  1. Inner Class
  2. Sub class
  3. Private Class
  4. Anonymous class
Question 5 Multiple Choice (Single Answer)

Which is separate path of execution in program?

  1. Process
  2. Thread
  3. Both a & b
  4. None of the above
Question 6 Multiple Choice (Single Answer)

String Buffer supports ---------- strings

  1. Growable
  2. modifiable
  3. constant
  4. Both a & b
Question 7 Multiple Choice (Single Answer)

What are the states associated in the thread?-

  1. Ready
  2. Running
  3. Waiting
  4. All the above
Question 8 Multiple Choice (Single Answer)

A dynamic and interactive program that runs inside a web page displayed by a java capable browser is called as

  1. Servlet
  2. Applet
  3. Scriptlet
  4. Both a and b
Question 9 Multiple Choice (Single Answer)

What is the lifecycle of an applet?-

  1. Init(),start(),paint(),stop(),destroy()
  2. Init(),start(),paint(),destroy(),stop()
  3. Init(),paint(),start(),destroy(),stop()
  4. None of the above
Question 10 Multiple Choice (Single Answer)

--------is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time

  1. Request Tracking
  2. Session tracking
  3. Process Tracking
  4. All the above
Question 11 Multiple Choice (Single Answer)

Which feature allows one interface to be used for general class actions?

  1. Polymorphism
  2. Inheritance
  3. Encapsulation
  4. Both a &b
Question 12 Multiple Choice (Single Answer)

Which method is used to call Garbage Collection explicitly?

  1. Out.gc()
  2. System.gc()
  3. Print.gc()
  4. None of the above
Question 13 Multiple Choice (Single Answer)

What is a software component that has been designed to be reusable in a variety of different environments?

  1. Applet
  2. Java Bean
  3. Hash table
  4. Class
Question 14 Multiple Choice (Single Answer)

Which is not one of the component of bin?

  1. JAVAC
  2. AWT
  3. API
  4. Applet Viewer
Question 15 Multiple Choice (Single Answer)

In J2EE Model is typically

  1. JSP
  2. Controller
  3. Java classes
  4. XML
Question 16 Multiple Choice (Single Answer)

In J2EE View is typically

  1. JSP
  2. Controller
  3. Java classes
  4. XML
Question 17 Multiple Choice (Single Answer)

Which is not a keyword?

  1. Finalize
  2. Finally
  3. Final
  4. Both a &c
Question 18 Multiple Choice (Single Answer)

What are Predefined variables or implicit objects?

  1. Request
  2. Response
  3. session
  4. All the above
Question 19 Multiple Choice (Single Answer)

--------combines Java Servlets, Java Server Pages, custom tags, and message resources into a unified framework.

  1. Struts
  2. Server
  3. Client
  4. None of the above
Question 20 Multiple Choice (Single Answer)

A method in a class having the same method name with different arguments is said to be

  1. Method overriding
  2. Method overloading
  3. Method overwriting
  4. None of the above