| | |
String comparison
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Dec 2007
Posts: 28
Reputation:
Solved Threads: 0
Hi
I m developing an application in which i want to compare a String with string[].
Means i m having array of names which i m displaying in a table..Then i m changing some names in table dynamically by some processing and adding new names to the table...
While replacing i want to check weather the new name is present in the array of previously added names... and if not present add it to table...
Now if i used for loop and compare new name with names[] ..it'll compare only one name at a time..but i want to compare new name with total array...
how can i do this..
plz help..
thnks..
I m developing an application in which i want to compare a String with string[].
Means i m having array of names which i m displaying in a table..Then i m changing some names in table dynamically by some processing and adding new names to the table...
While replacing i want to check weather the new name is present in the array of previously added names... and if not present add it to table...
Now if i used for loop and compare new name with names[] ..it'll compare only one name at a time..but i want to compare new name with total array...
how can i do this..
plz help..
thnks..
I don't think that's possible. You can check the String against each String in your array (which is what you've said you don't want to do?) but how does it make sense to compare a single string with an array of strings? When do you expect them to be equal?
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend. ![]() |
Similar Threads
- Unexpected return from string comparison function (C)
- search in a string (Assembly)
- string compare (C++)
- Coverting a string to a byte array (Visual Basic 4 / 5 / 6)
- Help with String Comparison (C++)
- string comparison in VB.net (VB.NET)
Other Threads in the Java Forum
- Previous Thread: Setting Frame Size
- Next Thread: Java Project
| Thread Tools | Search this Thread |
-xlint actionlistener android api applet application array arrays automation binary blackberry block bluetooth character chat class classes client code compile component consumer database desktop developmenthelp eclipse error event exception fractal ftp game gameprogramming givemetehcodez graphics gui html ide image input integer j2me j2seprojects java javac javaee javaprojects jmf jni jpanel julia lego linked linux list loop loops mac map method methods mobile netbeans newbie notdisplaying number online print printf problem program programming project properties recursion researchinmotion rotatetext rsa scanner screen server set singleton size sms sort sql string swing system template textfields threads time title tree tutorial-sample update windows working





