Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

comparsion of two strings without ignoring usecases and spaces

 
Miss Zara
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;
}
 
Vijayendra V Rao
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic