Hello,
public static void X(){
ArrayList o = new ArrayList();
o.add("a1");
o.add(o);
for( Object c: o )
if(c.getClass() .toString() == "java.lang.Stri ng")
System.out.prin tln("Found one : " + c);
}
Why is n't working as expected?
if it is a string print "a1" in this example?
Thank you
public static void X(){
ArrayList o = new ArrayList();
o.add("a1");
o.add(o);
for( Object c: o )
if(c.getClass() .toString() == "java.lang.Stri ng")
System.out.prin tln("Found one : " + c);
}
Why is n't working as expected?
if it is a string print "a1" in this example?
Thank you
Comment