public class TesteEquals {
public static void main(String[] args) {
// TODO Auto-generated method stub
StringBuffer s1 = new StringBuffer("hello");
StringBuffer s2 = new StringBuffer("hello");
Float f1 = 9.0F;
Double f2 = 9.0;
System.out.println(f1.equals(f2));
System.out.println(s1==s2);
System.out.println(s1.equals(s2));
}
}
nao entendi o porq o 1 e o 2 teste da false...