MCQOPTIONS
Saved Bookmarks
This section includes 177 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
XML Element to declare a bean implemented by Groovy |
| A. | lang:groovy |
| B. | lang:jruby |
| C. | beanscript:jruby |
| D. | script:jruby |
| Answer» B. lang:jruby | |
| 52. |
XML element to specify the property values for scripting bean |
| A. | lang:property |
| B. | bean:property |
| C. | script:property |
| D. | None of the mentioned |
| Answer» B. bean:property | |
| 53. |
XML Element to declare a bean implemented by JRuby |
| A. | lang:jruby |
| B. | aop:jruby |
| C. | beanscript:jruby |
| D. | script:jruby |
| Answer» B. aop:jruby | |
| 54. |
In Ruby instance variable begins with |
| A. | # |
| B. | * |
| C. | @ |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 55. |
Lightweight java scripting language executing java fragments |
| A. | JRuby |
| B. | Groovy |
| C. | BeanShell |
| D. | All of the mentioned |
| Answer» D. All of the mentioned | |
| 56. |
Dynamic Language for java platform to cope up with other languages |
| A. | JRuby |
| B. | Groovy |
| C. | BeanShell |
| D. | All of the mentioned |
| Answer» C. BeanShell | |
| 57. |
Scripting language based on Ruby |
| A. | JRuby |
| B. | Groovy |
| C. | BeanShell |
| D. | All of the mentioned |
| Answer» B. Groovy | |
| 58. |
Scripting languages supported by Spring? |
| A. | JRuby |
| B. | Groovy |
| C. | BeanShell |
| D. | All of the mentioned |
| Answer» E. | |
| 59. |
Spring includes AnnotationBeanConfigurerAspect in its aspect library for configuring the dependencies of any objects |
| A. | True |
| B. | False |
| Answer» B. False | |
| 60. |
Which scope does @Configurable instantiated class looks for? |
| A. | Singleton |
| B. | Prototype |
| C. | None of the mentioned |
| D. | All of the mentioned |
| Answer» C. None of the mentioned | |
| 61. |
We can directly use Spring AOP for injection of beans |
| A. | True |
| B. | False |
| Answer» C. | |
| 62. |
How to inject Spring bean into domain objects |
| A. | AOP |
| B. | XML |
| C. | AspectJ |
| D. | Java Based |
| Answer» B. XML | |
| 63. |
Objects created outside the container:- |
| A. | Domain Objects |
| B. | User Objects |
| C. | SpringVisitor Objects |
| D. | None of the mentioned |
| Answer» B. User Objects | |
| 64. |
Library to use AspectJ weaver |
| A. | spring-instrument.jar |
| B. | spring-introduction.jar |
| C. | spring-aop.jar |
| D. | spring-weave.jar |
| Answer» B. spring-introduction.jar | |
| 65. |
You also have to include suitable load-time weaver’s configuration in XML |
| A. | True |
| B. | False |
| Answer» C. | |
| 66. |
XML Element to include load-time weaver |
| A. | aop:config |
| B. | aop:auto-wire |
| C. | context:load-time-weaver |
| D. | aop:load-time-weaver |
| Answer» D. aop:load-time-weaver | |
| 67. |
How to weave your classes using argument while compiling? |
| A. | -javaagent:CLASSPATH |
| B. | -javaagent:PackgePath |
| C. | -javaweave:CLASSPATH |
| D. | -javaweave:PackagePath |
| Answer» B. -javaagent:PackgePath | |
| 68. |
Name of the process when targe classes are loaded into JVM |
| A. | load-time weaving |
| B. | process-time weaving |
| C. | load-process weaving |
| D. | process-delivery weaving |
| Answer» B. process-time weaving | |
| 69. |
Special compiler used during weaving |
| A. | jvm |
| B. | gcc |
| C. | ajc |
| D. | none of the mentioned |
| Answer» D. none of the mentioned | |
| 70. |
Applying aspects to your target objects |
| A. | AspectJ Annotation |
| B. | Weaving |
| C. | All of the mentioned |
| D. | None of the mentioned |
| Answer» C. All of the mentioned | |
| 71. |
What are the ways to declare an advice? |
| A. | pointcut-ref attribute |
| B. | pointcut attribute |
| C. | all of the mentioned |
| D. | none of the mentioned |
| Answer» D. none of the mentioned | |
| 72. |
Tag which defined Spring AOP configurations |
| A. | aop:config |
| B. | aop:configregister |
| C. | aop:configbeans |
| D. | None of the mentioned |
| Answer» B. aop:configregister | |
| 73. |
Tag used to enable AspectJ annotation? |
| A. | Introduction |
| B. | aop:aspectj-autowire |
| C. | aop:aspectj-autoproxy |
| D. | AfterSpecial |
| Answer» D. AfterSpecial | |
| 74. |
Tag used to declare aspects |
| A. | aop:config |
| B. | aop:auto-proxy |
| C. | aop:autowire |
| D. | None of the mentioned |
| Answer» B. aop:auto-proxy | |
| 75. |
How to introduce counter field to original bean class? |
| A. | Using Spring AOP |
| B. | Implementing interface |
| C. | AspectJ Pointcut |
| D. | None of the mentioned |
| Answer» B. Implementing interface | |
| 76. |
How to keep track of the usage of your beans |
| A. | Calling Count |
| B. | Last modified date |
| C. | New Interface to your object |
| D. | All of the mentioned |
| Answer» E. | |
| 77. |
Attribute used to specify implementation class |
| A. | no such attribute |
| B. | defaultImpl |
| C. | defaultInterface |
| D. | defaultImplement |
| Answer» C. defaultInterface | |
| 78. |
Target Classes can be denoted by Introduction Annotation |
| A. | True |
| B. | False |
| Answer» B. False | |
| 79. |
Annotation used to declare an introduction |
| A. | Before |
| B. | After |
| C. | @DeclareParents |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 80. |
How does an Introduction advice do this in Spring? |
| A. | dynamic proxy |
| B. | web proxy |
| C. | implements org.springframework.net.bundle interface |
| D. | none of the mentioned |
| Answer» B. web proxy | |
| 81. |
In introduction advice you have to modify class to introduce new methods |
| A. | True |
| B. | False |
| Answer» C. | |
| 82. |
Introduction advice helps in implementing multiple inheritance |
| A. | True |
| B. | False |
| Answer» B. False | |
| 83. |
Which special type of advice is used to implement an interface? |
| A. | Introduction |
| B. | Before |
| C. | After |
| D. | AfterSpecial |
| Answer» B. Before | |
| 84. |
Pointcut used to parse an AspectJ pointcut expression string |
| A. | org.springframework.aop.aspectj.AspectJExpressionPointcut |
| B. | org.springframework.aop.aspectj.AspectJExpressionPointcutString |
| C. | org.springframework.aop.aspectj.AspectJExpressionString |
| D. | org.springframework.aop.aspectj.AspectJPointcuttoString |
| Answer» B. org.springframework.aop.aspectj.AspectJExpressionPointcutString | |
| 85. |
Pointcuts can be composed using:- |
| A. | org.springframework.aop.support.Pointcuts class |
| B. | composablePointcut class |
| C. | all of the mentioned |
| D. | none of the mentioned |
| Answer» D. none of the mentioned | |
| 86. |
Spring supports operations on pointcuts:- |
| A. | notably |
| B. | union |
| C. | intersection |
| D. | all of the mentioned |
| Answer» E. | |
| 87. |
Method which checks if all target classes are matched |
| A. | matches() |
| B. | pair() |
| C. | matchTargetClass() |
| D. | none of the mentioned |
| Answer» B. pair() | |
| 88. |
Are logical operators valid in pointcut expressions? |
| A. | Yes |
| B. | No |
| Answer» B. No | |
| 89. |
Expressions which returns Parameters of pointcuts? |
| A. | target |
| B. | args |
| C. | none of the mentioned |
| D. | all of the mentioned |
| Answer» E. | |
| 90. |
Bean name patterns are supported by all configurations(XML,Java,AspectJ) |
| A. | True |
| B. | False |
| Answer» C. | |
| 91. |
Which of the following pattern is used to match bean name? |
| A. | bean(*Calculator) |
| B. | bean(Calculator) |
| C. | bean(com.appress.spring.Calculator) |
| D. | None of the mentioned |
| Answer» B. bean(Calculator) | |
| 92. |
The annotations must be added to the implementation class but not the interface |
| A. | True |
| B. | False |
| Answer» B. False | |
| 93. |
Is the following pointcut expression correct? execution(* ArithmeticCalculator.*(..)) |
| A. | Yes |
| B. | No |
| C. | If every target class is in same package |
| D. | Depends where target class is located |
| Answer» D. Depends where target class is located | |
| 94. |
Spring AOP only supports method execution join points for the beans in its IoC container |
| A. | True |
| B. | False |
| Answer» B. False | |
| 95. |
Language used to set various kinds of join points |
| A. | AspectJ pointcut language |
| B. | Java pointcut language |
| C. | XML pointcut language |
| D. | None of the mentioned |
| Answer» B. Java pointcut language | |
| 96. |
Annotation used to refer poincuts? |
| A. | @Pointcut |
| B. | @PointcutExecution |
| C. | @PointcutBefore |
| D. | None of the mentioned |
| Answer» B. @PointcutExecution | |
| 97. |
PointCut definitions can’t be reused again |
| A. | True |
| B. | False |
| Answer» C. | |
| 98. |
Which tag in XML is used to declare @Before advice’s method? |
| A. | aop:before |
| B. | aop:after |
| C. | aop:afterthrow |
| D. | None of the mentioned |
| Answer» B. aop:after | |
| 99. |
Which instantiation model is supported by AspectJ? |
| A. | perthis |
| B. | pertarget |
| C. | none of the mentioned |
| D. | all of the mentioned |
| Answer» E. | |
| 100. |
Method which returns the highest priority of aspect’s join point? |
| A. | getHighestPriority |
| B. | getOrder |
| C. | getHighOrder |
| D. | getPriority |
| Answer» C. getHighOrder | |