/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;
class Ideone {
public static void main
(String[] args
) {
Scanner scan
= new Scanner
(System.
in);
ArrayList<String> lista = new ArrayList<String>();
lista.add("frase que pode ser considerada muito longa");
lista.add("frase curta");
lista.add("frase com mais palavras");
@Override
// TODO Auto-generated method stub
return o1.length() - o2.length();
}
});
for (int i = 0; i < lista.size(); i++) {
System.
out.
print(lista.
get(i
)); System.
out.
println(" - tamanho: " + lista.
get(i
).
length());
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgppbXBvcnQgamF2YS51dGlsLkFycmF5TGlzdDsKaW1wb3J0IGphdmEudXRpbC5Db2xsZWN0aW9uczsKaW1wb3J0IGphdmEudXRpbC5Db21wYXJhdG9yOwppbXBvcnQgamF2YS51dGlsLlNjYW5uZXI7CgpjbGFzcyBJZGVvbmUgewoKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgIAkKICAgIAlTY2FubmVyIHNjYW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoKICAgICAgICBBcnJheUxpc3Q8U3RyaW5nPiBsaXN0YSA9IG5ldyBBcnJheUxpc3Q8U3RyaW5nPigpOwogICAgICAgIGxpc3RhLmFkZCgiZnJhc2UgcXVlIHBvZGUgc2VyIGNvbnNpZGVyYWRhIG11aXRvIGxvbmdhIik7CiAgICAgICAgbGlzdGEuYWRkKCJmcmFzZSBjdXJ0YSIpOwogICAgICAgIGxpc3RhLmFkZCgiZnJhc2UgY29tIG1haXMgcGFsYXZyYXMiKTsKCiAgICAgICAgQ29sbGVjdGlvbnMuc29ydChsaXN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