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.
Questions
What are container services?
- Life cycle management
- Security
- Deployment
- All the above
What are the components of a web module? (a) JSP (b) JAVA (c)html (d)Deployment descriptors
- (a) and (b)
- (a), (b) and (c )
- (c )
- All the above
What is HashMap and Map? Answer in order
- Interface and Class
- Class and Interface
- interface and interface
- class and class
Which class cant have explicit constructors?
- Inner Class
- Sub class
- Private Class
- Anonymous class
Which is separate path of execution in program?
- Process
- Thread
- Both a & b
- None of the above
String Buffer supports ---------- strings
- Growable
- modifiable
- constant
- Both a & b
What are the states associated in the thread?-
- Ready
- Running
- Waiting
- All the above
A dynamic and interactive program that runs inside a web page displayed by a java capable browser is called as
- Servlet
- Applet
- Scriptlet
- Both a and b
What is the lifecycle of an applet?-
- Init(),start(),paint(),stop(),destroy()
- Init(),start(),paint(),destroy(),stop()
- Init(),paint(),start(),destroy(),stop()
- None of the above
--------is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time
- Request Tracking
- Session tracking
- Process Tracking
- All the above
Which feature allows one interface to be used for general class actions?
- Polymorphism
- Inheritance
- Encapsulation
- Both a &b
Which method is used to call Garbage Collection explicitly?
- Out.gc()
- System.gc()
- Print.gc()
- None of the above
What is a software component that has been designed to be reusable in a variety of different environments?
- Applet
- Java Bean
- Hash table
- Class
Which is not one of the component of bin?
- JAVAC
- AWT
- API
- Applet Viewer
In J2EE Model is typically
- JSP
- Controller
- Java classes
- XML
In J2EE View is typically
- JSP
- Controller
- Java classes
- XML
Which is not a keyword?
- Finalize
- Finally
- Final
- Both a &c
What are Predefined variables or implicit objects?
- Request
- Response
- session
- All the above
--------combines Java Servlets, Java Server Pages, custom tags, and message resources into a unified framework.
- Struts
- Server
- Client
- None of the above
A method in a class having the same method name with different arguments is said to be
- Method overriding
- Method overloading
- Method overwriting
- None of the above