Why does the spring constant not depend on the mass of the object attached? It is said that:
$$ F = -m\omega^2 x = -kx, $$
so $k=m\omega^2$. Since $k$ is the spring constant it doesn't depend on the mass of the object attached to it, but here $m$ signifies the mass of the object. Then how is $k$ independent of the mass attached?
 A: $\omega$ isn't a constant of the spring, but it actually depends on the mass you attach to the spring. $\omega$ refers to the frequency of oscillation of the attached mass. The formula for $\omega$ for an attached mass $m$ is $\sqrt{\frac{k}{m}}$, where $k$ is the spring constant. If you use $\omega=\sqrt{\frac{k}{m}}$ in the formula, $m$ cancels out leaving only $k$
A: 
Then how $k$ is independent of mass attached?

The clue is in :
$$F=kx$$
It states simply that the spring, when extended by $x$, will provide a restoring force $F=kx$.
The force needed to affect the extension (displacement) $x$ can be provided by almost anything. A mass (its weight) can do it but is just one way, one way of many.
A: The unit of $k$ is $\frac N m=\frac{kgm}{{sec}^2}/m=\frac{kg}{{sec}^2}$, so $kx$ has the unit of a force, which is explicitly stated in Hooke's law, $F=ma=kx$. This means you can divide the mass out on both sides of the equation. So Hooke's law doesn't depend on the mass attached to a string.
For more information, see this Wikipedia article.
A: The value of k represents the amount of force required to extend the spring by 1 meter. So on earth that there will be a specific amount of mass required to extend the spring by 1 meter this mass is k/g so in earth's specific gravitational field the constant k/g is the amount of mass required to extend the spring 1 meter so you can see the constant is representing a mass. However this is a specific case for earth's gravitational field as the amount of mass needed to extend the spring in different gravitational fields would be different but what wouldn't be different is the amount of force required,that is why we use k as a force constant it's more general because it's constant in all gravitational fields. The mass constant k/g is only constant for earth.
