SlideShare ist ein Scribd-Unternehmen logo
1 von 12
RAD Mock Test 2
1. Assuming defaults, a developer can add an entry in the Tasks view using which TWO of the
following options?

a.Highlight a piece of text in the source editor, select Source -> Add Task from the context menu.
b.Add a comment of the "//TODO" in a Java source file.
c.Right click anywhere on the Tasks view, select Add Task from the context menu.
d.From the main menu, select Window -> Tasks -> Add Task

Answer :B & C

2. In which TWO of the following locations can the context root of a Dynamic Web project be
changed?

a.The Modules page of the Application Deployment Descriptor editor.
b.The XML source of the application.xml file
c.From the J2EE dialog of the Properties of the Dynamic Web project
d.The source of the web.xml file

Answer :B & C

3. Which of the following is NOT supported by page Designer?

a.ASP
b.HTML
c.JSP
d.JavaScript

Answer :A


4. An enterprise Application project contains multiple Dynamic Web projects. All of the Web projects
use a set of common classes defined in a Java project. The common classes are still development and
are changing daily. What is the BEST way to make the common classes available to the Web projects at
runtime?

a.Add the java project as web library project in each of the Wars.
b.Add the Java project as a Project Utility JAR in the EAR and create a Java JAR Dependency in each
of the Dynamic Web projects.
c.Export the Java project as a JAR file and import it into the WebConetext/WEB-INF /lib folder of each
of the Dynamic Web projects.
d.Export the classes of the Java project and import the individual class files into the WebContent/WEB-
INF/classes folder of each of the Dynamic Web projects.

Answer :B

5. Which TWO of the following views allow a developer to see struts resources organized by their
Struts-specific types?
a.Project Explorer
b.Java Browsing
c.Struts gallery
d.Struts Explorer
e.Modules

Answer :A & D

6. Which of the following operations CANNOT be performed via the insert Custom Tag dialog when
editing a JSP in page Designer?

a.Import a tag library into the Web project
b.Add a taglib descriptor to the JSP.
c.Add a tag to the JSP.
d.Add a custom JSP tag to the JSP.

Answer :C

7. A developer is creating a Struts enabled application using the Web Diagram editor. The resources in
the editor that are gray and do not have bold label text are:

a.Private
b.External
c.Unrealized
d.Interfaces

Answer :C

8. S developer has a Partially complete Web application at the C:rootwebApplication directory. In
order to continue development in Rational Application Developer, what could the developer do?

a.Open a new workspace at C:ROOTWEBaPPLICATION
b.Open a new workspace at C:root, and create a new Web project called web Application.
c.From any workspace, create a new Web project, setting the context root to C:rootwebApplication.
d.From any workspace, create a new Web project, and selectively import the files from
C:rootwebApplication.

Answer :D

9. A company is designing Web application. Which TWO of the following technologies provide a
model-view-controller framework?

a.Struts
b.Servlet
c.JSTL
d. JSF
e.SDO

Answer :A & D
10. a.When a developer creates a servlet using the SERVLET WIZARD, WHAT IS THE PURPOSE
OF THE SERVLET NAME?
b.It is required to be used as the servlet class name
c.It is used in the default URL mapping
d.It is used to create an interface to the servlet
e.It is used for filter mapping

Answer :B
11. A developer wishes to create a project that contains a mix of HTML files, JSP files, servlets and
java classes. Which option should the developer choose in the New Project wizard?

a.Dynamic Web Project
b.Static Web Project
c.Java Project
d.Server Project

Answer :A

12. A Dynamic Web project is created with the name of projectName, the context root of rootName,
and the project location of C:workspaceNameprojectName.An index page is created at
WebContentindex.html. When the project is deployed on the default Server, what is the URL address
for accessing the index page?

a.http://localhost.9080/rootName/index.html
b.http://localhost:9080/rootName/WebContent/index.html
c.http://localhost:9080/WebContent/Index.html
d.http://localhost:9080/projectName/Index.html
e.http://localhost:9080/workspacename/projectName/WebContent/index.html

Answer :A

13. A Dynamic Web project has a dependency on a third-party JAR file. This Web project is the only
project in the Enterprise Application project that requires these classes. Which of the following is the
BEST way to make these classes available to the Web project?

a.Import the JAR file into a Java project.Add the Java project as a Web Library Project in the WAR.
b.Import the JAR file into a Java project. Add the Java project as a Project Utility JAR in the EAR and
create a JAVA JAR Dependency in the WAR.
c.Import the JAR into the WebContent/Web-INF/lib folder of the Dynamic Web project.
d.Import the JAR into the Enterprise Application project and create a Java JAR Dependency in the
WAR
Answer :C

14. Which of the following editors has been designed to edit an XML document that defines the Action
Mappings for a Struts application?

a.Web Deployment Descriptor editor
b.Application Deployment Descriptor editor
c.Java Visual editor
d.Struts Configuration File editor

Answer :D

15. A developer configures Servlet1 with a load-on-startup value of 1 and Servlet2 with a load-on-
startup value of 2. What is the effect of this?

a.Servlet1 will load, Servlet2 will load, Servlet1 init(),Servlet2 init()
b.Servlet2 will load, Servlet1 will load, Servlet2 init(),Servlet1 init()
c.Servlet1 will load, Servlet1init(), Servlet2 will load,Servlet2 init()
d.Servlet2 will load, Servlet2 Init (), Servlet1 will load,Servlet1 init()

Answer :C

16. Which of the following Link Validation options is available through the properties of a Dynamic
Web project?

a.Automatically rename links to files which have been moved or renamed
b.Stop link validation while offline
c.Set up Proxy server attributes
d.Validate links in Workspace only, ignore external links

Answer :A

17. Which of the following JavaServer Faces development tasks is NOT supported by Rational
Application Developer?

a.Bind a JSF UI component to a JavaBean
b.Create Faces tables within another Faces table
c.Use JSTL with JSF
d.Add a custom UI component to the Palette view

Answer :D

18. Within Page Designer, what are the three representations of a page?

a.Page, View, and Run
b.Page, View, and Execute
c.Design, Source, and Execute
d.Design, Source, and Preview

Answer :D

19. Which TWO of the following can be configured from the Servlets Page of the Web Deployment
Descriptor editor?

a.Load on Startup
b.Web Servlets Binding
c.Tag Lib References
d.URL Mappings

Answer :A & D

20. Which TWO of the following views are available to assist composing Web pages in the default Web
perspective using Page Designer?

a.Palette
b.Quick Edit
c.Hierarchy
d.Types

Answer :A,B


21. What is Folding?

       a. Expand

       b. Expansion and Collapse

       c. Extract

       d. Collapse

     Ans. B



22. Can we create Applet & Swing Programs without using Visual Class feature of RAD?

       a. Yes

       b. No

      Ans. A



23. In Data Perspective, Connections feature is in which view?

       a. Database Explorer

       b. Data Project Explorer

       c. Properties

       d. Data Output

     Ans. A
24. Can we run the program in Debug perspective, without applying breakpoints?

       a. Yes

       b. No

     Ans. A



25. How to create a jar file?

       a. Right click Project -> New Archive -> Jar File

       b. Right click Project -> Import-> Jar File

       c. Right click Project ->Export ->Jar File

       d. Right click Project -> New - > Jar file

    Ans. C

26. How many perspectives does RAD & consist of?

       a. 13

       b. 14

       c. 15

       d. 16

    Ans. D

27. How to debug a program step by step?

       a. By inserting Tasks at particular lines

       b. By inserting Variables in the program

       c. By inserting Breakpoints at particular lines

       d. By adding comments in the program

    Ans. C

28. How to create User Defined Exceptions?

       a. By creating a User defined class

       b. By creating a User defined class extending Throwable
c. By creating a User defined class extending Exception

         d. By creating a User defined class extending Error

   Ans. C

29. Which class is the superclass of every class?

         a. Object

         b. Main

         c. PrintStream

         d. Exception

   Ans. A

30. What if I write “static public void” instead of “public static void”?
   a. Error
   b. Program compiles and runs properly.
   c. Exception

   d. Program compiles but does not run properly

   Ans. B



31. Anonymous class is an Inner Class?

         a. Yes

         b. No

         Ans. A



32.Can I import the same package or class twice in a program?

a. Yes

b. No

Ans. A

33. I don’t want finally to be executed in the program. How to achieve this?
a. By writing System.exit(0) at the end of try block

            b. By writing System.exit(1) at the end of catch block

            c. By writing System.gc() in finally block

            d. By writing System.close() in try block

Ans. A

34. Can the main method be declared final?

a. Yes

b. No

Ans. A

35. What method must be implemented by all Threads?

a. init()

b. start()

c. run()

d. notify()

Ans. C

36. Life Cycle of Servlet is :

a. init() -> service() -> destroy()

b. init() -> start() -> destroy()

c. init() -> start() -> sleep()

d. init() -> service()-> stop()

Ans. A

37. How to apply formatting to a program using RAD ?

a. right click -> source -> arrange

b. right click -> source -> format

c. right click -> source -> properties -> format

d. right click -> source -> Correct indentation
Ans. B

38. Content Assist feature is auto generated by :

a. shift+ C

b.alt+spacebar

c. ctrl+spacebar

d. ctrl+alt+spacebar

Ans. C

39. What is fastest way to write System.out.println(); using RAD?

a. type syso and use content assist

b. type sysop and use content assist

c. type system.out.p and use content assist

d. type sop and use content assist

Ans. A

40.How many readymade templates are supported with “surround with” feature?

a. 5

b. 6

c. 7

d. 8

Ans. 7

41. What is Custom Servlet?

a. User Defined Servlet Extends HttpServlet

b. User Defined Servlet Extends GenericServlet

c. User Defined Servlet without extending GenericServlet

d. User Defined Servlet without extending HttpServlet

Ans. A

42. What is singleton class?
a. Class that can be instantiated only once.

b. Class that can be inherited only once

c. a final class

d. a private class

Ans. A

43. Can an exception be re-thrown?

a. yes

b. no

Ans. A

44. Difference between Vector & ArrayList. Select any 2 options?

a. Vector is synchronized & ArrayList is unsynchronized

b. Vector is unsynchronized & ArrayList is synchronized

c. Vector has default size of 10 & ArrayList has default size of 100

d. Vector has default size of 10 & ArrayList has no default size

Ans. A & D

45. What is static block?

a. Executed only once when the class is first loaded into JVM

b. Executed only after it is being inherited

c. Executed only after a static variable is called

d. Executed only after completion of execution of all remaining classes in the program

Ans. A

46. Which of the following are marker interface?

a. Exception

b. java.io.serializable

c. Cloneable

d. Servlet
Ans. B & C

47. Early Binding means:

a. Body provided during compilation time

b. No body provided during compilation time

c. Body provided during run time

d. No body provided during run time

Ans. A

48.Late Binding means:

a. Body provided during compilation time

b. No body provided during compilation time

c. Body provided during run time

d. No body provided during run time

Ans. C



49. What is mandatory while using super() in subclass?

a. it should be present in 1st line of subclass construstor

b. it can be present anywhere

c. it should be present at last line of subclass constructor

d. it should be present in 2nd line of subclass constructor

Ans. A

50. Can Constructor be inherited?

a. yes

b. No

Ans. B
Mock test rad 2

Weitere ähnliche Inhalte

Ähnlich wie Mock test rad 2

Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdfChapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
akknit
 
9 a0 056
9 a0 0569 a0 056
9 a0 056
Almo56
 
9 a0 046
9 a0 0469 a0 046
9 a0 046
Almo56
 
Microsoft MCPD 70-492 it examen dumps
Microsoft MCPD 70-492 it examen dumpsMicrosoft MCPD 70-492 it examen dumps
Microsoft MCPD 70-492 it examen dumps
lilylucy
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors
성진 원
 
7 Eclipse Cdt
7 Eclipse Cdt7 Eclipse Cdt
7 Eclipse Cdt
adaddada
 
Tổng hợp câu hỏi ôn tập android có đáp án
Tổng hợp câu hỏi ôn tập android có đáp ánTổng hợp câu hỏi ôn tập android có đáp án
Tổng hợp câu hỏi ôn tập android có đáp án
bsb_2209
 

Ähnlich wie Mock test rad 2 (20)

hi
hihi
hi
 
seminar
seminarseminar
seminar
 
Javascript Question
Javascript QuestionJavascript Question
Javascript Question
 
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdfChapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
 
ASSIGNMENT
ASSIGNMENTASSIGNMENT
ASSIGNMENT
 
9 a0 056
9 a0 0569 a0 056
9 a0 056
 
9 a0 046
9 a0 0469 a0 046
9 a0 046
 
Developer Android Tools
Developer Android ToolsDeveloper Android Tools
Developer Android Tools
 
Top Javascript Q's
Top Javascript Q'sTop Javascript Q's
Top Javascript Q's
 
Microsoft MCPD 70-492 it examen dumps
Microsoft MCPD 70-492 it examen dumpsMicrosoft MCPD 70-492 it examen dumps
Microsoft MCPD 70-492 it examen dumps
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors
 
16 asp.net session23
16 asp.net session2316 asp.net session23
16 asp.net session23
 
C_CPI_14.pdf
C_CPI_14.pdfC_CPI_14.pdf
C_CPI_14.pdf
 
70 499
70 49970 499
70 499
 
7 Eclipse Cdt
7 Eclipse Cdt7 Eclipse Cdt
7 Eclipse Cdt
 
Tổng hợp câu hỏi ôn tập android có đáp án
Tổng hợp câu hỏi ôn tập android có đáp ánTổng hợp câu hỏi ôn tập android có đáp án
Tổng hợp câu hỏi ôn tập android có đáp án
 
Java Programming.pdf
Java Programming.pdfJava Programming.pdf
Java Programming.pdf
 
190 959
190 959190 959
190 959
 
Bus 517 final exam – strayer new
Bus 517 final exam – strayer newBus 517 final exam – strayer new
Bus 517 final exam – strayer new
 
Bus 517 final exam – strayer new
Bus 517 final exam – strayer newBus 517 final exam – strayer new
Bus 517 final exam – strayer new
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Mock test rad 2

  • 1. RAD Mock Test 2 1. Assuming defaults, a developer can add an entry in the Tasks view using which TWO of the following options? a.Highlight a piece of text in the source editor, select Source -> Add Task from the context menu. b.Add a comment of the "//TODO" in a Java source file. c.Right click anywhere on the Tasks view, select Add Task from the context menu. d.From the main menu, select Window -> Tasks -> Add Task Answer :B & C 2. In which TWO of the following locations can the context root of a Dynamic Web project be changed? a.The Modules page of the Application Deployment Descriptor editor. b.The XML source of the application.xml file c.From the J2EE dialog of the Properties of the Dynamic Web project d.The source of the web.xml file Answer :B & C 3. Which of the following is NOT supported by page Designer? a.ASP b.HTML c.JSP d.JavaScript Answer :A 4. An enterprise Application project contains multiple Dynamic Web projects. All of the Web projects use a set of common classes defined in a Java project. The common classes are still development and are changing daily. What is the BEST way to make the common classes available to the Web projects at runtime? a.Add the java project as web library project in each of the Wars. b.Add the Java project as a Project Utility JAR in the EAR and create a Java JAR Dependency in each of the Dynamic Web projects. c.Export the Java project as a JAR file and import it into the WebConetext/WEB-INF /lib folder of each of the Dynamic Web projects. d.Export the classes of the Java project and import the individual class files into the WebContent/WEB- INF/classes folder of each of the Dynamic Web projects. Answer :B 5. Which TWO of the following views allow a developer to see struts resources organized by their Struts-specific types?
  • 2. a.Project Explorer b.Java Browsing c.Struts gallery d.Struts Explorer e.Modules Answer :A & D 6. Which of the following operations CANNOT be performed via the insert Custom Tag dialog when editing a JSP in page Designer? a.Import a tag library into the Web project b.Add a taglib descriptor to the JSP. c.Add a tag to the JSP. d.Add a custom JSP tag to the JSP. Answer :C 7. A developer is creating a Struts enabled application using the Web Diagram editor. The resources in the editor that are gray and do not have bold label text are: a.Private b.External c.Unrealized d.Interfaces Answer :C 8. S developer has a Partially complete Web application at the C:rootwebApplication directory. In order to continue development in Rational Application Developer, what could the developer do? a.Open a new workspace at C:ROOTWEBaPPLICATION b.Open a new workspace at C:root, and create a new Web project called web Application. c.From any workspace, create a new Web project, setting the context root to C:rootwebApplication. d.From any workspace, create a new Web project, and selectively import the files from C:rootwebApplication. Answer :D 9. A company is designing Web application. Which TWO of the following technologies provide a model-view-controller framework? a.Struts b.Servlet c.JSTL d. JSF e.SDO Answer :A & D
  • 3. 10. a.When a developer creates a servlet using the SERVLET WIZARD, WHAT IS THE PURPOSE OF THE SERVLET NAME? b.It is required to be used as the servlet class name c.It is used in the default URL mapping d.It is used to create an interface to the servlet e.It is used for filter mapping Answer :B 11. A developer wishes to create a project that contains a mix of HTML files, JSP files, servlets and java classes. Which option should the developer choose in the New Project wizard? a.Dynamic Web Project b.Static Web Project c.Java Project d.Server Project Answer :A 12. A Dynamic Web project is created with the name of projectName, the context root of rootName, and the project location of C:workspaceNameprojectName.An index page is created at WebContentindex.html. When the project is deployed on the default Server, what is the URL address for accessing the index page? a.http://localhost.9080/rootName/index.html b.http://localhost:9080/rootName/WebContent/index.html c.http://localhost:9080/WebContent/Index.html d.http://localhost:9080/projectName/Index.html e.http://localhost:9080/workspacename/projectName/WebContent/index.html Answer :A 13. A Dynamic Web project has a dependency on a third-party JAR file. This Web project is the only project in the Enterprise Application project that requires these classes. Which of the following is the BEST way to make these classes available to the Web project? a.Import the JAR file into a Java project.Add the Java project as a Web Library Project in the WAR. b.Import the JAR file into a Java project. Add the Java project as a Project Utility JAR in the EAR and create a JAVA JAR Dependency in the WAR. c.Import the JAR into the WebContent/Web-INF/lib folder of the Dynamic Web project. d.Import the JAR into the Enterprise Application project and create a Java JAR Dependency in the WAR Answer :C 14. Which of the following editors has been designed to edit an XML document that defines the Action Mappings for a Struts application? a.Web Deployment Descriptor editor b.Application Deployment Descriptor editor
  • 4. c.Java Visual editor d.Struts Configuration File editor Answer :D 15. A developer configures Servlet1 with a load-on-startup value of 1 and Servlet2 with a load-on- startup value of 2. What is the effect of this? a.Servlet1 will load, Servlet2 will load, Servlet1 init(),Servlet2 init() b.Servlet2 will load, Servlet1 will load, Servlet2 init(),Servlet1 init() c.Servlet1 will load, Servlet1init(), Servlet2 will load,Servlet2 init() d.Servlet2 will load, Servlet2 Init (), Servlet1 will load,Servlet1 init() Answer :C 16. Which of the following Link Validation options is available through the properties of a Dynamic Web project? a.Automatically rename links to files which have been moved or renamed b.Stop link validation while offline c.Set up Proxy server attributes d.Validate links in Workspace only, ignore external links Answer :A 17. Which of the following JavaServer Faces development tasks is NOT supported by Rational Application Developer? a.Bind a JSF UI component to a JavaBean b.Create Faces tables within another Faces table c.Use JSTL with JSF d.Add a custom UI component to the Palette view Answer :D 18. Within Page Designer, what are the three representations of a page? a.Page, View, and Run b.Page, View, and Execute c.Design, Source, and Execute d.Design, Source, and Preview Answer :D 19. Which TWO of the following can be configured from the Servlets Page of the Web Deployment Descriptor editor? a.Load on Startup b.Web Servlets Binding
  • 5. c.Tag Lib References d.URL Mappings Answer :A & D 20. Which TWO of the following views are available to assist composing Web pages in the default Web perspective using Page Designer? a.Palette b.Quick Edit c.Hierarchy d.Types Answer :A,B 21. What is Folding? a. Expand b. Expansion and Collapse c. Extract d. Collapse Ans. B 22. Can we create Applet & Swing Programs without using Visual Class feature of RAD? a. Yes b. No Ans. A 23. In Data Perspective, Connections feature is in which view? a. Database Explorer b. Data Project Explorer c. Properties d. Data Output Ans. A
  • 6. 24. Can we run the program in Debug perspective, without applying breakpoints? a. Yes b. No Ans. A 25. How to create a jar file? a. Right click Project -> New Archive -> Jar File b. Right click Project -> Import-> Jar File c. Right click Project ->Export ->Jar File d. Right click Project -> New - > Jar file Ans. C 26. How many perspectives does RAD & consist of? a. 13 b. 14 c. 15 d. 16 Ans. D 27. How to debug a program step by step? a. By inserting Tasks at particular lines b. By inserting Variables in the program c. By inserting Breakpoints at particular lines d. By adding comments in the program Ans. C 28. How to create User Defined Exceptions? a. By creating a User defined class b. By creating a User defined class extending Throwable
  • 7. c. By creating a User defined class extending Exception d. By creating a User defined class extending Error Ans. C 29. Which class is the superclass of every class? a. Object b. Main c. PrintStream d. Exception Ans. A 30. What if I write “static public void” instead of “public static void”? a. Error b. Program compiles and runs properly. c. Exception d. Program compiles but does not run properly Ans. B 31. Anonymous class is an Inner Class? a. Yes b. No Ans. A 32.Can I import the same package or class twice in a program? a. Yes b. No Ans. A 33. I don’t want finally to be executed in the program. How to achieve this?
  • 8. a. By writing System.exit(0) at the end of try block b. By writing System.exit(1) at the end of catch block c. By writing System.gc() in finally block d. By writing System.close() in try block Ans. A 34. Can the main method be declared final? a. Yes b. No Ans. A 35. What method must be implemented by all Threads? a. init() b. start() c. run() d. notify() Ans. C 36. Life Cycle of Servlet is : a. init() -> service() -> destroy() b. init() -> start() -> destroy() c. init() -> start() -> sleep() d. init() -> service()-> stop() Ans. A 37. How to apply formatting to a program using RAD ? a. right click -> source -> arrange b. right click -> source -> format c. right click -> source -> properties -> format d. right click -> source -> Correct indentation
  • 9. Ans. B 38. Content Assist feature is auto generated by : a. shift+ C b.alt+spacebar c. ctrl+spacebar d. ctrl+alt+spacebar Ans. C 39. What is fastest way to write System.out.println(); using RAD? a. type syso and use content assist b. type sysop and use content assist c. type system.out.p and use content assist d. type sop and use content assist Ans. A 40.How many readymade templates are supported with “surround with” feature? a. 5 b. 6 c. 7 d. 8 Ans. 7 41. What is Custom Servlet? a. User Defined Servlet Extends HttpServlet b. User Defined Servlet Extends GenericServlet c. User Defined Servlet without extending GenericServlet d. User Defined Servlet without extending HttpServlet Ans. A 42. What is singleton class?
  • 10. a. Class that can be instantiated only once. b. Class that can be inherited only once c. a final class d. a private class Ans. A 43. Can an exception be re-thrown? a. yes b. no Ans. A 44. Difference between Vector & ArrayList. Select any 2 options? a. Vector is synchronized & ArrayList is unsynchronized b. Vector is unsynchronized & ArrayList is synchronized c. Vector has default size of 10 & ArrayList has default size of 100 d. Vector has default size of 10 & ArrayList has no default size Ans. A & D 45. What is static block? a. Executed only once when the class is first loaded into JVM b. Executed only after it is being inherited c. Executed only after a static variable is called d. Executed only after completion of execution of all remaining classes in the program Ans. A 46. Which of the following are marker interface? a. Exception b. java.io.serializable c. Cloneable d. Servlet
  • 11. Ans. B & C 47. Early Binding means: a. Body provided during compilation time b. No body provided during compilation time c. Body provided during run time d. No body provided during run time Ans. A 48.Late Binding means: a. Body provided during compilation time b. No body provided during compilation time c. Body provided during run time d. No body provided during run time Ans. C 49. What is mandatory while using super() in subclass? a. it should be present in 1st line of subclass construstor b. it can be present anywhere c. it should be present at last line of subclass constructor d. it should be present in 2nd line of subclass constructor Ans. A 50. Can Constructor be inherited? a. yes b. No Ans. B