Created
September 25, 2019 03:09
-
-
Save mateusmiguel/fd86cbd29e85dc4890ef6d51ad295ff6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Arrays; | |
| public class CadastroAlunos { | |
| public static void main(String args[]) { | |
| String[] Alunos = new String[25]; | |
| for (int i = 0; i < 25; i++) { | |
| Alunos[i] = "Aluno " + (i + 1); | |
| } | |
| String[] MaisAlunos = Arrays.copyOf(Alunos, 30); | |
| for (int i = 25; i < 30; i++) { | |
| MaisAlunos[i] = "Aluno adicional " + (i + 1); | |
| } | |
| System.out.println(Arrays.toString(MaisAlunos)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment