This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Java in General and the fly likes comparsion of two strings without ignoring usecases and spaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "comparsion of two strings without ignoring usecases and spaces" Watch "comparsion of two strings without ignoring usecases and spaces" New topic
Author

comparsion of two strings without ignoring usecases and spaces

Miss Zara
Greenhorn

Joined: Jan 07, 2005
Posts: 2
hello frnds....

i m facing problem in this code....i want to compare the strings...for entering only unique values

String uniquenessCheck() {
LinkedHashMap instances = getInstanceList();

if (instances != null) {
Iterator instanceIter = instances.values().iterator();

while (instanceIter.hasNext()) {
TVCreative thisCreative = (TVCreative) instanceIter.next();

String compareTitle = getCreativeTitle().trim().toLowerCase();

if (thisCreative.getCreativeTitle().toLowerCase().equals(compareTitle)
return "creativeTitle";
}
}

return null;
}
Vijayendra V Rao
Ranch Hand

Joined: Jul 04, 2004
Posts: 195
Are you able to compile this piece of code in the first place? If yes, then tell us the actual problem that you are facing.


Vijayendra <br /> <br />"The harder you train in peace, the lesser you bleed in war"
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: comparsion of two strings without ignoring usecases and spaces