Answered Questions

  • toString function

    What is the default value for toString() in java? Explain me with an example?

    Nikhil

    • Feb 21st, 2013

    If toString() method is not overriden, it will return

    public String toString() {
    return getClass().getName() + "@" + Integer.toHexString(hashCode());
    }

    This is Object version of this method.