hi...I want to find the index of "{" bracket in a string but it is showing -1 always why?
here is my code:
File file1 = new File("prob.txt");
//StringBuffer contents = new StringBuffer();
BufferedReader reader = null;
String text=null;
try
{
reader = new BufferedReader(new FileReader(file1));
while ((text = reader.readLine()) != null) {
String []splits1 = text.split(" \\s+." );
for(int j=0; j< splits1.length ;j++){
if(splits1[j].length() > 0 && splits1[j].charAt(0) == '1'&& splits1[j].charAt(1) == '0')
{
int h=splits1[j].indexOf('{');
System.out.println(h);
System.out.println(splits1[j]);
System.out.println("rashi");
}
}
}
}
MY string is:
10 3.94 4.87 7.27 9.34 11.78 13.44 15.99 (18.31) [23.21] .
I want to know the index of { and } bracket but it;s always showing -1...why.plz correct me??

