Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void escolherNumeroEleminar(String[][] socios, int nSocios, int nCampos) {
- String numeroApagarS = JOptionPane.showInputDialog("Digite o numero do socio que pertende eleminar");
- int numeroApagar = Integer.parseInt(numeroApagarS);
- eleminar(socios, nSocios, nCampos, numeroApagar);
- }
- public static void eleminar(String[][] socios, int nSocios, int nCampos, int numeroApagar) {
- for (int i = numeroApagar; i < nSocios; i++) {
- for (int j = 0; i < nCampos; j++) {
- socios[i][j] = socios[i + 1][j];
- }
- }
- nSocios--;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement