Basic java help!!! for vectors (for IgnoreCaseSensitive)

hi everybody,

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.>

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

Look in the String API and see what methods it has.

floundera at 2007-7-29 11:45:20 > top of Java-index,Java Essentials,Java Programming...
# 2

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.

java@mania at 2007-7-29 11:45:20 > top of Java-index,Java Essentials,Java Programming...
# 3

here:

String str1 = "need";

String str2 = "help";

if(str1.compareToIgnoreCase(str2) == 0){

// your code

}

Yannixa at 2007-7-29 11:45:20 > top of Java-index,Java Essentials,Java Programming...
# 4

hi Yannix,flounder,

thanks for the reply.

java@mania at 2007-7-29 11:45:20 > top of Java-index,Java Essentials,Java Programming...