I have
String[] x1 = new String[] { "05:30", "07:20", "13:30", "21:30"};
String[] x2 = new String[] { "08:30", "01:20"};
String[] x3 = new String[] { "12:30", "00:20", "13:54"};
From a database I receive x1 or x2 or x3 name.
String get_x = null;
Cursor cursor = db.rawQuery(selectQuery, null);
if (cursor.moveToFirst()) {
do {
get_x = cursor.getString(0); // get_x will have value x1 or x2 or x3
} while (cursor.moveToNext());
}
And then I want to get size of returned x[1 or 2 or 3] eg. int size = x1.length, where x1 is value of get_x string.
I tried
int size = get_x.length;
but not working. 'size' will be equal with length of get_x, not length of x1.length