Spring interview questions part 34

Spring interview questions part 34

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. When serializing an object to a file, the standard convention in Java is to give the file a:

Correct Answer is : .ser

2. What will be the value of transient field after deserialization:-

Correct Answer is : All of the mentioned

3. If the class implements java.io.Serializable, then it is serializable; otherwise, it’s not.

Correct Answer is : TRUE

4. A transaction propagation behavior can be specified by the:-

Correct Answer is : propagation

5. Transaction propagation behavior are defined in the:-

Correct Answer is : org.springframework.transaction.TransactionDefinition

6. If there’s an existing transaction in progress, the current method should run within this transaction.

Correct Answer is : Required

7. The current method must start a new transaction and run within its own transaction.

Correct Answer is : REQUIRES NEW

8. If there’s an existing transaction in progress, the current method can run within this transaction.

Correct Answer is : SUPPORTS

9. The current method should not run within a transaction.

Correct Answer is : NOT SUPPORTED

10. The current method must run within a transaction.

Correct Answer is : MANDATORY

11. The current method should not run within a transaction. If there’s an existing transaction in progress, an exception will be thrown.

Correct Answer is : NEVER

12. If there’s an existing transaction in progress, the current method should run within the nested transaction.

Correct Answer is : NESTED

13. For two transactions T1 and T2, T1 reads a field that has been updated by T2 but not yet committed.

Correct Answer is : Dirty Read

14. For two transactions T1 and T2, T1 reads a field and then T2 updates the field.

Correct Answer is : Nonrepeatable read

15. For two transactions T1 and T2, T1 reads some rows from a table and then T2 inserts new rows into the table.

Correct Answer is : Phantom read

16. For two transactions T1 and T2, they both select a row for update, and based on the state of that row, make an update to it.

Correct Answer is : Lost Updates

17. Isolation Levels Supported by Spring:-

Correct Answer is : All of the mentioned

18. The exceptions that cause a transaction to roll back or not can be specified by attribute:-

Correct Answer is : rollback

19. A web service contract is described using :-

Correct Answer is : Web Services Description Language

20. There are two approaches to developing a web service, depending on whether you define the contract first or last.

Correct Answer is : TRUE

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon