The correct answer is B. 4 joules.
The energy stored in a capacitor is given by the formula:
$E = \frac{1}{2}CV^2$
where $C$ is the capacitance in farads, $V$ is the voltage in volts, and $E$ is the energy in joules.
In this case, we have $C = 1\text{ F}$ and $V = 4\text{ V}$. Substituting these values into the formula, we get:
$E = \frac{1}{2}(1\text{ F})(4\text{ V})^2 = 4\text{ J}$
Therefore, the capacitor will store 4 joules of energy.
Option A is incorrect because it is half the correct answer. Option C is incorrect because it is twice the correct answer. Option D is incorrect because it is four times the correct answer.