Dear All;
Yesterday i went for an interview for the post of
Java Programmer.In second round of
technical interview there were some questions in which i having some doubts so i am
mentioning that noted questions with options..
kindly let me know correct answers so my doubt gets cleared
1>What is the effect of adding the sixth element to a vector created in the folowing manner?
new Vector(5, 10);
IN THIS I THINK A SHOULD BE THE ANSWER...
A. nothing, the vector will have grown when the fifth element was added
b. the vector grows size to a capacity of 10 elements
c. An indexOutOfBounds exception is raised
d. The vector grows in size to a capacity of 15 elements
2>A System has a transaction manager, which manages transaction among multipe resources usin
the 2-PC protocol. During one such transaction using User Transaction, while trying to
commit data to one resource I got a Heruistic message.
A. The transaction managerhas decided not to commit data to the resource and hence sends
information back to the client saying that it(Transaction Manager) has taken a Heuristic
decision
B. The resource decides to commit data on its own without permission from the Trancsaction
Manager and informs the transaction manager that it(Transaction Manager)has taken a
Heuristic decision, which in turn inform the client.
C. The resource decides not to commit data by taking permission from the Transaction Manager
and informs the Transaction Manager that it(Transaction Manager)has taken a Heuristic
decision, which in turn inform the client.
D. The resource decides not to commit data without taking permission from the Transaction
Manager(Transaction Manager) and informs the transaction manager that it has taken a
Heuristic dexesion, which in turn inform the client.
Hope to hear from you soon.
Thanks & Best Regards,
Brijesh shah