Solution (source code)

= Solution

<Weak-star topology>[Weak-star convergence] means pointwise convergence on the predual:
$$
\Lambda_j(x)\longrightarrow\Lambda(x)
\qquad\text{for every }x\in X.
$$
For each $x\in X$, its image $J_Xx\in X''$ under the <canonical embedding into the bidual> satisfies $(J_Xx)(\Lambda)=\Lambda(x)$. Thus weak convergence implies weak-star convergence, and altogether
$$
\text{norm convergence}\ \Longrightarrow\
\text{weak convergence}\ \Longrightarrow\
\text{weak-star convergence}.
$$

For the requested example, let
$$
f_j(x)=\sin(jx)\in L^\infty(\mathbb R).
$$
The <Riemann-Lebesgue lemma> gives $f_j\mathrel{\stackrel{*}{\rightharpoonup}}0$ in $(L^1)'$. Since
$$
f_j(x)^2=\frac12-\frac12\cos(2jx),
$$
the same lemma gives $f_j^2\mathrel{\stackrel{*}{\rightharpoonup}}1/2$. Hence $f=0$ and $g=1/2\ne f^2$, exhibiting the <failure of weak-star convergence to commute with squaring>.