Let \(\Omega=\{HH,HT,TH,TT\}\), \(\mathcal F=2^{\Omega}\), and \(\mathbb P:\mathcal F\to[0,1]\) be determined with \(\mathbb P\left(\left\{s\right\}\right)=\frac14\) for every \(s\in\Omega\). This probability space corresponds to two tosses of a fair coin. We will first construct two random variables \(X_0\) and \(Y_0\) on \(\Omega\) that are not independent and that satisfy \(\mathbb E\left[X_0\right]=0\), \(\mathbb E\left[Y_0\right]=0\), and \(\mathbb E\left[X_0Y_0\right]=0\). The variables \(X\) and \(Y\) will then be defined as \[X=X_0+4,\quad\quad Y=Y_0+7.\]
The random variable \(X_0\) is defined to take the value \(0\) if the first outcome is \(H\). The random variable \(Y_0\) is defined to have the value \(0\) if the first outcome is tail. Then the product of \(X_0\) and \(Y_0\) is always \(0\) and hence \(\mathbb E\left[X_0Y_0\right]=0\).
So far, we defined \(X_0(HH)=X_0(HT)=0\) and \(Y_0(TH)=Y_0(TT)=0\). It remains to define \(X_0(TH)\), \(X_0(TT)\), \(Y_0(HH)\), and \(Y_0(HT)\) in such a way that the expected values of \(X_0\) and \(Y_0\) are \(0\). It suffices to put \(X_0(TH)=1\), \(X_0(TT)=-1\), \(Y_0(HH)=1\), \(Y_0(HT)=-1\).
The expected value of \(X_0\) is indeed \(0\) because \begin{eqnarray*}\mathbb E\left[X_0\right] &=&\frac14\left(X_0(HH)+X_0(HT)+X_0(TH)+X_0(TT)\right)\\
&=&\frac14\left(0+0+1-1\right)=0.\end{eqnarray*} Similarly we obtain \(\mathbb E\left[Y_0\right]=0\).
The expected value of \(X\) is \(\mathbb E\left[X\right]=\mathbb E\left[X_0+4\right]=4+\mathbb E\left[X_0\right]=4\). Similarly, \(\mathbb E\left[Y\right]=7\). The expected value of \(XY\) is \begin{eqnarray*}\mathbb E\left[XY\right]&=&
\mathbb E\left[\left(X_0+4\right)\left(Y_0+7\right)\right]\\ &=&\mathbb E\left[X_0Y_0\right]+4\mathbb E\left[Y_0\right]+7\mathbb E\left[X_0\right]+4\cdot 7\\&=&28.
\end{eqnarray*}
The variance of each \(X\) and \(Y\) is non-zero because they are not constant random variables.