class HelloWorld {
public static void main
(String[] args
) { String[] vetor
= {"aaa",
"aaa",
"aaa",
"bbb",
"bbb",
"bbb",
"ccc",
"ccc",
"ccc",
"ddd",
"ddd",
"ddd"}; for (int i = 0; i < vetor.length; i += 3) {
novoVetor[i / 3] = vetor[i] + vetor[i + 1] + vetor[i + 2];
}
for (String item
: novoVetor
) { }
}
}
Y2xhc3MgSGVsbG9Xb3JsZCB7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CgkJU3RyaW5nW10gdmV0b3IgPSB7ImFhYSIsICJhYWEiLCAiYWFhIiwgImJiYiIsICJiYmIiLCAiYmJiIiwgImNjYyIsICJjY2MiLCAiY2NjIiwgImRkZCIsICJkZGQiLCAiZGRkIn07CiAgICAgICAgU3RyaW5nW10gbm92b1ZldG9yID0gbmV3IFN0cmluZ1t2ZXRvci5sZW5ndGggLyAzXTsKICAgICAgICBmb3IgKGludCBpID0gMDsgaSA8IHZldG9yLmxlbmd0aDsgaSArPSAzKSB7CiAgICAgICAgICAgIG5vdm9WZXRvcltpIC8gM10gPSB2ZXRvcltpXSArIHZldG9yW2kgKyAxXSArIHZldG9yW2kgKyAyXTsKICAgICAgICB9CiAgICAgICAgZm9yIChTdHJpbmcgaXRlbSA6IG5vdm9WZXRvcikgewogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oaXRlbSk7CiAgICAgICAgfQoJfQp9