/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
Scanner input
= new Scanner
(System.
in);
for(int i = 0; i<nome.length; ++i) {
System.
out.
print("Digite o nome do " +(i
+1) + "ยบ aluno: "); nome[i] = input.nextLine();
}
for (int i=0; i< nome.length; i++){
firstNames[i] = nome[i].split("\\s")[0];
}
for(String firstName
: firstNames
){ System.
out.
println(firstName
); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVNjYW5uZXIgaW5wdXQgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwogICAgICAgIFN0cmluZyBub21lW10gPSBuZXcgU3RyaW5nWzNdOwoKICAgICAgICBmb3IoaW50IGkgPSAwOyBpPG5vbWUubGVuZ3RoOyArK2kpIHsKCiAgICAgICAgU3lzdGVtLm91dC5wcmludCgiRGlnaXRlIG8gbm9tZSBkbyAiICsoaSsxKSArICLCuiBhbHVubzogIik7CiAgICAgICAgbm9tZVtpXSA9IGlucHV0Lm5leHRMaW5lKCk7CgogICAgICAgIH0KCgkgICAgU3lzdGVtLm91dC5wcmludGxuKCIgIik7CgkKCSAgICBBcnJheXMuc29ydChub21lKTsKCSAgICAKCSAgICBTdHJpbmdbXSBmaXJzdE5hbWVzID0gbmV3IFN0cmluZ1tub21lLmxlbmd0aF07CgkKC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