Skip to content
Snippets Groups Projects
Commit 1e807a6a authored by Dennis Eisold's avatar Dennis Eisold
Browse files
parents 9565f3f6 02334130
No related branches found
No related tags found
No related merge requests found
......@@ -136,27 +136,31 @@ public class DatenbankSqlite {
/**
* Generiert einen String aus 10 * 2 unterschiedlichen Großbuchstaben
* @return String => 10 Buchstabenkombinationen mit Komma getrennt
*/
/*
private static String steckverbindung(){
Random rnd = new Random();
String steckverbindung="";
char[] c = new char[2];
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 2; j++) {
c[j]= (char) (rnd.nextInt(26) + 'A');
if (j==1) {
while (c[0] == c[j]) {
c[j] = (char) (rnd.nextInt(26) + 'A');
}
}
}
System.out.println(c[0]+" / "+c[1]);
steckverbindung+= ((""+c[0]) + (""+c[1]) +",");
}
steckverbindung= (String) steckverbindung.subSequence(0,steckverbindung.lastIndexOf(","));
return steckverbindung;
}*/
* @return String => 10 Buchstabenkombinationen mit Komma getrennt
*//*
private static String steckverbindung(){
Random rnd = new Random();
String steckverbindung="";
char[] c = new char[20];
for (int i = 0; i < 20; i++) {
c[i] = (char) (rnd.nextInt(26) + 'A');
for (int j = i; j >= 0; j--) {
if (i>j) {
while (c[i]==c[j]) {
c[i] = (char) (rnd.nextInt(26) + 'A');
j= i-1;
}
}
}
}
steckverbindung = ((""+c[0]) + (""+c[1]) +"," +(""+c[2]) +(""+c[3]) + ","+(""+c[4]) +(""+c[5]) + ","+(""+c[6]) +(""+c[7]) + ","
+(""+c[8]) +(""+c[9]) + ","+(""+c[10]) +(""+c[11]) + ","+(""+c[12]) +(""+c[13]) + ","+(""+c[14]) +(""+c[15]) + ","+(""+c[16]) +(""+c[17]) + ","
+(""+c[18]) +(""+c[19]));
// System.out.println(steckverbindung);
// steckverbindung= (String) steckverbindung.subSequence(0,steckverbindung.lastIndexOf(","));
return steckverbindung;
}*/
//endregion
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment