mock test rad 2

14
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 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 3. Which of the following is NOT supported by page Designer? a.ASP b.HTML c.JSP d.JavaScript 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

Upload: jainpraneel30

Post on 27-Oct-2014

32 views

Category:

Documents


6 download

TRANSCRIPT

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

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

3. Which of the following is NOT supported by page Designer? a.ASP b.HTML c.JSP d.JavaScript

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/WEBINF/classes folder of each of the Dynamic Web projects.

5. Which TWO of the following views allow a developer to see struts resources organized by their Strutsspecific types? a.Project Explorer

b.Java Browsing c.Struts gallery d.Struts Explorer e.Modules

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.

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

8. S developer has a Partially complete Web application at the C:\root\webApplication directory. In order to continue development in Rational Application Developer, what could the developer do? a.Open a new workspace at C:\ROOT\WEBaPPLICATION 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:\root\webApplication. d.From any workspace, create a new Web project, and selectively import the files from C:\root\webApplication.

9. A company is designing Web application. Which TWO of the following technologies provide a modelview-controller framework? a.Struts b.Servlet c.JSTL d. JSF e.SDO

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 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

12. A Dynamic Web project is created with the name of projectName, the context root of rootName, and the project location of C:\workspaceName\projectName.An index page is created at WebContent\index.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

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 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

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()

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

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 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 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

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

21. What is Folding? a. Expand b. Expansion and Collapse c. Extract d. Collapse

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

23. In Data Perspective, Connections feature is in which view? a. Database Explorer b. Data Project Explorer c. Properties d. Data Output

24. Can we run the program in Debug perspective, without applying breakpoints? a. Yes

b. No

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

26. How many perspectives does RAD & consist of? a. 13 b. 14 c. 15 d. 16

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

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

29. Which class is the superclass of every class? a. Object b. Main c. PrintStream d. Exception

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

31. Anonymous class is an Inner Class? a. Yes b. No

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

33. I dont 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

34. Can the main method be declared final? a. Yes b. No

35. What method must be implemented by all Threads? a. init() b. start() c. run() d. notify()

36. Life Cycle of Servlet is : a. init() -> service() -> destroy() b. init() -> start() -> destroy() c. init() -> start() -> sleep() d. init() -> service()-> stop()

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

38. Content Assist feature is auto generated by :

a. shift+ C b.alt+spacebar c. ctrl+spacebar d. ctrl+alt+spacebar

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

40.How many readymade templates are supported with surround with feature? a. 5 b. 6 c. 7 d. 8

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

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

43. Can an exception be re-thrown? a. yes b. no

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

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

46. Which of the following are marker interface? a. Exception b. java.io.serializable c. Cloneable d. Servlet

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

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

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

50. Can Constructor be inherited? a. yes b. No