
05-08-2008, 12:28 PM
|
 |
Senior Member
|
|
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
|
|
Originally Posted by Eranga
No, you are wrong. Because trim() not will effect with '==' operators. That one of the deprecate process take place by Suns'
If you do it as follows,
if("String".equals("String ".trim()))
System.out.println("Yes");
else
System.out.println("No");
Your answer is "Yes". trim() do the omitting white spaces perfectly.
Hey Eranga
Really ....... It's important point.
askkkkkkkkkkkkkkkkkk morreeeeeeeeeee dear..
__________________
sanjeev,संजीव
|