Code:
import java.io.*;
public class class1{
public static void main
(String args [])
{
String s = "UIL STATE 2004";
String [] t = s.split("[AEIOU]");
System.out.println(t[2]);
System.out.println(t.length);
}
}
im getting pretty confussed about this, when i put a lil space in the
Quote:
String [] t = s.split("[AEIOU]");
|
and make it look like this
Quote:
String [] t = s.split;(" [AEIOU] ")
|
then i get a total different answer, and im wondering why, im suppossed to get
L*ST (if space where to be considered the *)
and for the second one i should be getting a five which i am, but, only if the space inside the quotations is removed, would someone plz help me, by explaning me a little bit more about this, thank you.