Hi!
Wie kann ich die Funktion kombination("abcd") aufrufen?
Für mich deswegen so schwer weil Rückgabe String[] array ist
[Edit by Beni: Code eingerückt]
Wie kann ich die Funktion kombination("abcd") aufrufen?
Für mich deswegen so schwer weil Rückgabe String[] array ist
Code:
public class Test
{
public String[] kombination(String bla)
{
char te;
String temp = null;
String[] temp2 = null;
String[] ret = null;
String h = null;
int uzun = bla.length();
if (uzun > 0 )
{
for (int i=0; i<uzun; i++ )
{
te=bla.charAt(i);
temp += te;
h = bla.substring(0,i);
temp2[i]= h;
for (int j=0; j<uzun-1; j++ )
{
ret[j] =temp2[j]+temp;
}
}
}
return ret;
}
public static void main(String[] args)
{
Test t = new Test();
//??? t.kombination("Zwei")??????????
}
}
[Edit by Beni: Code eingerückt]