RAD Mock Test 21. Assuming defaults, a developer can add an entry in the Tasks view using which TWO of thefollowing option...
a.Project Explorerb.Java Browsingc.Struts galleryd.Struts Explorere.ModulesAnswer :A & D6. Which of the following operatio...
10. a.When a developer creates a servlet using the SERVLET WIZARD, WHAT IS THE PURPOSEOF THE SERVLET NAME?b.It is required...
c.Java Visual editord.Struts Configuration File editorAnswer :D15. A developer configures Servlet1 with a load-on-startup ...
c.Tag Lib Referencesd.URL MappingsAnswer :A & D20. Which TWO of the following views are available to assist composing Web ...
24. Can we run the program in Debug perspective, without applying breakpoints?       a. Yes       b. No     Ans. A25. How ...
c. By creating a User defined class extending Exception         d. By creating a User defined class extending Error   Ans....
a. By writing System.exit(0) at the end of try block            b. By writing System.exit(1) at the end of catch block    ...
Ans. B38. Content Assist feature is auto generated by :a. shift+ Cb.alt+spacebarc. ctrl+spacebard. ctrl+alt+spacebarAns. C...
a. Class that can be instantiated only once.b. Class that can be inherited only oncec. a final classd. a private classAns....
Ans. B & C47. Early Binding means:a. Body provided during compilation timeb. No body provided during compilation timec. Bo...
Mock test rad 2
Upcoming SlideShare
Loading in …5
×

Mock test rad 2

2,183 views

Published on

hh

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,183
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
60
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mock test rad 2

  1. 1. RAD Mock Test 21. Assuming defaults, a developer can add an entry in the Tasks view using which TWO of thefollowing 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 TaskAnswer :B & C2. In which TWO of the following locations can the context root of a Dynamic Web project bechanged?a.The Modules page of the Application Deployment Descriptor editor.b.The XML source of the application.xml filec.From the J2EE dialog of the Properties of the Dynamic Web projectd.The source of the web.xml fileAnswer :B & C3. Which of the following is NOT supported by page Designer?a.ASPb.HTMLc.JSPd.JavaScriptAnswer :A4. An enterprise Application project contains multiple Dynamic Web projects. All of the Web projectsuse a set of common classes defined in a Java project. The common classes are still development andare changing daily. What is the BEST way to make the common classes available to the Web projects atruntime?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 eachof the Dynamic Web projects.c.Export the Java project as a JAR file and import it into the WebConetext/WEB-INF /lib folder of eachof 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 :B5. Which TWO of the following views allow a developer to see struts resources organized by theirStruts-specific types?
  2. 2. a.Project Explorerb.Java Browsingc.Struts galleryd.Struts Explorere.ModulesAnswer :A & D6. Which of the following operations CANNOT be performed via the insert Custom Tag dialog whenediting a JSP in page Designer?a.Import a tag library into the Web projectb.Add a taglib descriptor to the JSP.c.Add a tag to the JSP.d.Add a custom JSP tag to the JSP.Answer :C7. A developer is creating a Struts enabled application using the Web Diagram editor. The resources inthe editor that are gray and do not have bold label text are:a.Privateb.Externalc.Unrealizedd.InterfacesAnswer :C8. S developer has a Partially complete Web application at the C:rootwebApplication directory. Inorder to continue development in Rational Application Developer, what could the developer do?a.Open a new workspace at C:ROOTWEBaPPLICATIONb.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 fromC:rootwebApplication.Answer :D9. A company is designing Web application. Which TWO of the following technologies provide amodel-view-controller framework?a.Strutsb.Servletc.JSTLd. JSFe.SDOAnswer :A & D
  3. 3. 10. a.When a developer creates a servlet using the SERVLET WIZARD, WHAT IS THE PURPOSEOF THE SERVLET NAME?b.It is required to be used as the servlet class namec.It is used in the default URL mappingd.It is used to create an interface to the servlete.It is used for filter mappingAnswer :B11. A developer wishes to create a project that contains a mix of HTML files, JSP files, servlets andjava classes. Which option should the developer choose in the New Project wizard?a.Dynamic Web Projectb.Static Web Projectc.Java Projectd.Server ProjectAnswer :A12. 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 atWebContentindex.html. When the project is deployed on the default Server, what is the URL addressfor accessing the index page?a.http://localhost.9080/rootName/index.htmlb.http://localhost:9080/rootName/WebContent/index.htmlc.http://localhost:9080/WebContent/Index.htmld.http://localhost:9080/projectName/Index.htmle.http://localhost:9080/workspacename/projectName/WebContent/index.htmlAnswer :A13. A Dynamic Web project has a dependency on a third-party JAR file. This Web project is the onlyproject in the Enterprise Application project that requires these classes. Which of the following is theBEST 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 andcreate 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 theWARAnswer :C14. Which of the following editors has been designed to edit an XML document that defines the ActionMappings for a Struts application?a.Web Deployment Descriptor editorb.Application Deployment Descriptor editor
  4. 4. c.Java Visual editord.Struts Configuration File editorAnswer :D15. 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 :C16. Which of the following Link Validation options is available through the properties of a DynamicWeb project?a.Automatically rename links to files which have been moved or renamedb.Stop link validation while offlinec.Set up Proxy server attributesd.Validate links in Workspace only, ignore external linksAnswer :A17. Which of the following JavaServer Faces development tasks is NOT supported by RationalApplication Developer?a.Bind a JSF UI component to a JavaBeanb.Create Faces tables within another Faces tablec.Use JSTL with JSFd.Add a custom UI component to the Palette viewAnswer :D18. Within Page Designer, what are the three representations of a page?a.Page, View, and Runb.Page, View, and Executec.Design, Source, and Executed.Design, Source, and PreviewAnswer :D19. Which TWO of the following can be configured from the Servlets Page of the Web DeploymentDescriptor editor?a.Load on Startupb.Web Servlets Binding
  5. 5. c.Tag Lib Referencesd.URL MappingsAnswer :A & D20. Which TWO of the following views are available to assist composing Web pages in the default Webperspective using Page Designer?a.Paletteb.Quick Editc.Hierarchyd.TypesAnswer :A,B21. What is Folding? a. Expand b. Expansion and Collapse c. Extract d. Collapse Ans. B22. Can we create Applet & Swing Programs without using Visual Class feature of RAD? a. Yes b. No Ans. A23. In Data Perspective, Connections feature is in which view? a. Database Explorer b. Data Project Explorer c. Properties d. Data Output Ans. A
  6. 6. 24. Can we run the program in Debug perspective, without applying breakpoints? a. Yes b. No Ans. A25. 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. C26. How many perspectives does RAD & consist of? a. 13 b. 14 c. 15 d. 16 Ans. D27. 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. C28. How to create User Defined Exceptions? a. By creating a User defined class b. By creating a User defined class extending Throwable
  7. 7. c. By creating a User defined class extending Exception d. By creating a User defined class extending Error Ans. C29. Which class is the superclass of every class? a. Object b. Main c. PrintStream d. Exception Ans. A30. 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. B31. Anonymous class is an Inner Class? a. Yes b. No Ans. A32.Can I import the same package or class twice in a program?a. Yesb. NoAns. A33. I don’t want finally to be executed in the program. How to achieve this?
  8. 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 blockAns. A34. Can the main method be declared final?a. Yesb. NoAns. A35. What method must be implemented by all Threads?a. init()b. start()c. run()d. notify()Ans. C36. Life Cycle of Servlet is :a. init() -> service() -> destroy()b. init() -> start() -> destroy()c. init() -> start() -> sleep()d. init() -> service()-> stop()Ans. A37. How to apply formatting to a program using RAD ?a. right click -> source -> arrangeb. right click -> source -> formatc. right click -> source -> properties -> formatd. right click -> source -> Correct indentation
  9. 9. Ans. B38. Content Assist feature is auto generated by :a. shift+ Cb.alt+spacebarc. ctrl+spacebard. ctrl+alt+spacebarAns. C39. What is fastest way to write System.out.println(); using RAD?a. type syso and use content assistb. type sysop and use content assistc. type system.out.p and use content assistd. type sop and use content assistAns. A40.How many readymade templates are supported with “surround with” feature?a. 5b. 6c. 7d. 8Ans. 741. What is Custom Servlet?a. User Defined Servlet Extends HttpServletb. User Defined Servlet Extends GenericServletc. User Defined Servlet without extending GenericServletd. User Defined Servlet without extending HttpServletAns. A42. What is singleton class?
  10. 10. a. Class that can be instantiated only once.b. Class that can be inherited only oncec. a final classd. a private classAns. A43. Can an exception be re-thrown?a. yesb. noAns. A44. Difference between Vector & ArrayList. Select any 2 options?a. Vector is synchronized & ArrayList is unsynchronizedb. Vector is unsynchronized & ArrayList is synchronizedc. Vector has default size of 10 & ArrayList has default size of 100d. Vector has default size of 10 & ArrayList has no default sizeAns. A & D45. What is static block?a. Executed only once when the class is first loaded into JVMb. Executed only after it is being inheritedc. Executed only after a static variable is calledd. Executed only after completion of execution of all remaining classes in the programAns. A46. Which of the following are marker interface?a. Exceptionb. java.io.serializablec. Cloneabled. Servlet
  11. 11. Ans. B & C47. Early Binding means:a. Body provided during compilation timeb. No body provided during compilation timec. Body provided during run timed. No body provided during run timeAns. A48.Late Binding means:a. Body provided during compilation timeb. No body provided during compilation timec. Body provided during run timed. No body provided during run timeAns. C49. What is mandatory while using super() in subclass?a. it should be present in 1st line of subclass construstorb. it can be present anywherec. it should be present at last line of subclass constructord. it should be present in 2nd line of subclass constructorAns. A50. Can Constructor be inherited?a. yesb. NoAns. B

×