1.
In Java, which of the following are valid constructors of the Thread class:

  1. Thread(Runnable r, String name)
  2. Thread()
  3. Thread(int priority)
  4. Thread(Runnable r, ThreadGroup g)
  5. Thread(Runnable r, int priority)
2.
In Java, which of the following statements is true?
3.
John has written an app without using any thread priorities. When John compiles the Java program, does JVM apply any thread priorities?
4.
In Java, which of the following statements is correct, if a user defines a protected method in a public class?
5.
In Java, a new Map instance is to be created and it should have an iteration order same as that of an existing Map instance. Which concrete implementation of the Map interface should be used for the new instance?
6.
In Java, which of the following asynchronous collection classes is used to expand or shrink its size and to provide indexed access to its elements?
7.
Assuming @Transactional annotation support is enabled and the transferMoney method is called
through a Spring AOP proxy, what is the behavior of the following code sample?
@Transactional(propagation=Propagation.REQUIRED)
public void transferMoney(Account src, Account target, double amount) {
add(src, -amount);
add(src, amount);
}
@Transactional(propagation=Propagation.REQUIRES_NEW)
public void add(Account account, Double amount) {
// IMPLEMENTATION


8.
In Spring, which of thee following statements is associated with this code:
execution(* com.test.service..*.*(*))
9.
Which of these is joinpoint method of the following pointcut expressions:
execution(public * *(..))
10.
What is a return data type void in Spring?