Originally posted by Rob Aught:
The two Strings in your example are NOT the same.
"ABCD" is different than " ABCD "
Placing a .trim() method on a comparison operator does nothing. The .trim() method returns a String, but the comparison is against the actual object s2. Even though .trim() returns a String with the whitespace removed, it does not change s2's object reference.
the compiler would complain since it isn't legal to use the . operator on a boolean value.
Originally posted by narasimha rao bandlamudi:
Did any one compile the above programme in 1.4. I am getting the below compiler errors. Please provide me the reson,
Orange.java:6: illegal start of expression
System.out.print((("A"+"B")= ="AB") + ",");
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Free, earth friendly heat - from the CodeRanch trailbosshttps://www.kickstarter.com/projects/paulwheaton/free-heat