Thread: Quiz Time
View Single Post
  #37 (permalink)  
Old 05-08-2008, 12:28 PM
sanjeevtarar's Avatar
sanjeevtarar sanjeevtarar is offline
Senior Member
 
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
sanjeevtarar is on a distinguished road
Quote:
Originally Posted by Eranga View Post
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,

Code:
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,संजीव
Reply With Quote