valueOf() is used to convert all the data types intostrings.toString() is used to convert objects intostrings.If u pass a object into valueOf() methos itinternally calls toString() method.hope i clarified atleast some of ur doubts