StringTokenizer tk = new StringTokenizer(str, "/ * usw.");
int counter = 0;
String myTk = null;
String editedString = null;
while(tk.hasMoreTokens())
{
myTk = tk.nextToken();
System.out.println(myTk);
counter = ++;
if(counter == 3) editedString = editToken(myTk);
}
private String editToken (String toEdit)
{
String editedString = null;
// hier bearbeiten
return editedString
}
int counter = 0;
String myTk = null;
String editedString = null;
while(tk.hasMoreTokens())
{
myTk = tk.nextToken();
System.out.println(myTk);
counter = ++;
if(counter == 3) editedString = editToken(myTk);
}
private String editToken (String toEdit)
{
String editedString = null;
// hier bearbeiten
return editedString
}
Zuletzt bearbeitet: