String []ar = {"A create %d"};
int x = u.nextInt(100);
ta.addElement(x);
That does not make much sense. Why are you trying to create a string array with just a single line of text? And the "%d" item is usually used in a format string to be replaced with a numeric value. I suspect you actually want something like:
String strText = String.format("A create %d", nextInt(100));
ta.addElement(strText);