Thuogh the value they contain same,they are two different types of objects (one is String and the other is StringBuffer).
Actually equals method of String checks for the object to be a type of String as well,whereas StringBuffer inherits the equals from Object which simply returns true if and only if both objects refers to the same object. So both conditions are false in this case. [ December 17, 2008: Message edited by: Vijitha Kumara ]