it should read:if( s.equals(contentFlag))This will return true if the content of s and thecontent of contentFlag are the same.By putting if(s == contentFlag)you are checking to see if s and contentFlag refer tothe same object.