The second const means the method can be called on a const object.
Consider this example:
class foo
{
public:
void const_method() const;
void nonconst_method();
};
void doit()
{
const foo f;
f.const_method(); // this is okay
f.nonconst_method(); // the compiler will not allow this
}
Furthermore, a const method is not allowed to change any members of the object (unless the member is specifically marked at mutable):
class foo
{
public:
void const_method() const;
private:
int r;
mutable int m;
};
void foo::const_method() const
{
m = 0; // this is okay as m is marked mutable
r = 0; // the compiler will not allow this
}