JDBC Transactions and Batch Operations
A transaction makes several statements succeed or fail together, and batching turns many round trips into one.
Interview preparation material.
40 notes tagged
A transaction makes several statements succeed or fail together, and batching turns many round trips into one.
Concatenating input into SQL lets a caller rewrite your query. Bound parameters make that structurally impossible.
An immutable object cannot change after construction, which removes whole categories of bug at the cost of a little copying.
A sealed type names exactly which types may extend it, which lets the compiler check that a pattern switch covers every case.
The collector reclaims objects that can no longer be reached. Understanding reachability explains both leaks and pauses.
Where each piece of data actually lives, and what runs out when each area is exhausted.
The class loader, the runtime data areas and the execution engine, and how a class file becomes running machine code.
The rules that decide when a write by one thread becomes visible to another, expressed as the happens-before relationship.
The two failures that define concurrency: results that depend on timing, and threads that wait for each other forever.
synchronized gives mutual exclusion and visibility. volatile gives visibility only, and knowing the difference prevents most concurrency bugs.
A thread moves through six states, and knowing which one it is in is the first step in diagnosing any hang.
A thread is an independent path of execution inside one process, and Java gives you several ways to start one.