use of IgnoreCase !!!!!

hi Balus C

This is my code for comparing the string and vector.

String value1="Jsp, Hibernate ,Weblogic9.0 , Struts";

String[] value2 = value1.trim().split(",");

String str = " jsp, struts, hibernate, java, Applets";

String[] str1 = str.trim().split(",");

boolean hello = false;

Vector abc = new Vector();

System.out.println("value of array" +value2);

for(int i=0;i<value2.length;i++)

{

System.out.println("Value of String is" +value2);

abc.add(value2);

}

System.out.println("value of vector is" +abc);

for(int i=0; i><str1.length;i++)

{

if(abc.contains(str1))

{

hello = true;

System.out.println("Value of hello is:"+hello);

}

else{

System.out.println("hello value " +hello);

}

In this program i want to compare vectore with String array but

Here the problem is that if str have values in lower case and the string are same then it give the value of boolean as false.

so how do i use the ignoreCase in order to solve my problem.

i am unable to solve this

please help.

i have seen the API but the problem is that i can't use ignoreCase directly. this is used with equalIgnoreCase(str).

or am i going right or not do tell me.

or do u have anyother method i could solve this.>

[1382 byte] By [java@mania] at [2007-11-27 10:53:49]
# 1

hi Balus C,

Was able to solve my problem.

before sending the string array to vector i converted the both the string toUpperCase().

but any ways thanks for giving the advice to see the API for String yesterday.

Thanks once again.

java@mania at 2007-7-29 11:46:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...