• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

comparsion of two strings without ignoring usecases and spaces  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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;
}
 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!