Can someone please me how I can write a Java code to transform the quantity 6 As into the string AAAAAA. I'm trying this, but it does not work:
public class Letters {
public static void main (String[] args) {
String words=" ";
String numberofwords="A";
int wordcount=6;
for (int I = 0; I < wordcount; I++) {
words += numberofwords;
}
System.out.println ("the letters are : + words);
}