For a bounded domain \(\Omega \) , we establish existence and multiplicity of nontrivial solutions for the semilinear elliptic problem \(\begin{aligned} \left\{ \begin{array}{rcll} -\Delta u &{} = &{} {g(u)} - h(x) f(u), &{} \text{ in } \Omega \\ u &{} = &{} 0, &{} \text{ on } \partial \Omega ,\\ \end{array} \right. \end{aligned}\) where \(h\in L^\infty (\Omega )\) is nonnegative and nontrivial, g is asymptotically linear, f is superlinear and \({g(0)}=f(0)=0\) . We also study the existence of solutions for the problem \(\begin{aligned} \left\{ \begin{array}{rcll} -\Delta u &{} = &{} {g(u)} - h(x)f(u)+k(x), &{} \text{ in } \Omega \\ u &{} = &{} 0, &{} \text{ on } \partial \Omega ,\\ \end{array} \right. \end{aligned}\) when \(k\in L^2(\Omega )\) .