Q: The property value is retrieved by:-
Solution: The property value is retrieved and set by calling the getValue() and setValue() methods.
Q: Which package is used for periodic work
Solution: Java 1.3 saw the introduction of java.util.TimerTask to support doing some sort of work periodically.
Q: Which subinterface provides functionality for managing Threads and their events
Solution: ExecutorService, a subinterface, provides more functionality for managing threads and providing support for raising events to the threads, such as shutdown().
Q: Method provided by ExectuorService which returns a Future < T >
Solution: ExecutorService, a subinterface, provides more functionality for managing threads and providing support for raising events to the threads, such as shutdown().
Q: Which method provided by ExecutorService is used to check whether job is finished or cancelled
Solution: You can call Future.isDone() or Future.isCancelled() to determine whether the job is finished or cancelled, respectively.
Q: Which of the following class’s instance is used by TimerTaskExecutor for managing jobs
Solution: TimerTaskExecutor uses a java.util.Timer instance and manages jobs (java.util.concurrent.Callable or java.lang.Runnable instances) for you by running them on the Timer.
Q: Which tag informs the spring container about the use of AspectJ annotation?
Solution: To enable AspectJ annotation support in the Spring IoC container, you only have to define an empty XML element aop:aspectj-autoproxy in your bean configuration file.
Q: Which of the following is advice supported by Aspect Annotation?
Solution: AspectJ supports five types of advice annotations: @Before, @After, @AfterReturning, @AfterThrowing, and @Around.
Q: Which advice is executed once a joint point finishes?
Solution: An after advice is executed after a join point finishes, whenever it returns a result or throws an exception abnormally.
Q: Which advice is executed only when joint point returns or throws an exception?
Solution: If you would like to perform logging only when a join point returns, you should replace the after advice with an after returning advice.
You Have Score    | /10 |