comparing two strings with linear search..

Reply

Join Date: Oct 2003
Posts: 1
Reputation: antaeus is an unknown quantity at this point 
Solved Threads: 0
antaeus antaeus is offline Offline
Newbie Poster

comparing two strings with linear search..

 
0
  #1
Oct 15th, 2003
/**
* Compares an artist string to this CD's artist to check if the
* two strings match exactly (ignoring case).
*
* @param otherArtist An artist's name.
* @return true if otherArtist and artist variables are the same
* ignoring case (String comparison).
*/
public boolean equalsArtist( String otherArtist ) {
return false;
}

how do i do this i am kinda confused any help would be cool
Last edited by antaeus; Oct 15th, 2003 at 6:24 pm.
Reply With Quote Quick reply to this message  
Join Date: Jul 2003
Posts: 117
Reputation: Iron_Cross is an unknown quantity at this point 
Solved Threads: 2
Iron_Cross's Avatar
Iron_Cross Iron_Cross is offline Offline
Junior Poster

Re: comparing two strings with linear search..

 
0
  #2
Oct 16th, 2003
Couldn't you just do something like

  1. if(artistName.equals("artistCD")){
  2. //do something if it's true
  3. }else{
  4. //do something if it's false
  5. }
where artistName is a variable for the artists name, and artistCD is a variable for the artist's cd. If that's not what you're looking for then I'm confused as to what you're asking
elitehackers.info
Today's Penny-Arcade!
Pain is weakness leaving the body!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC