java 33

Curso de Java Netbeans Completo☕ [33.- Ejercicio, Mezclar 2 arreglos]

En este tutorial vamos a mezclar 2 arreglos (vectores) en un 3er arreglo llamado c.

Codigo: https://github.com/programadornovato/java/commit/a0fbdc4a5a952fab456df5a521dccf0fd3d444e6

package com.programadornovato.proy1;

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Random;
import java.util.Scanner;
import javax.swing.JOptionPane;

/**
 *
 * @author eugenio
 */
public class holaMundo {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int a[]=new int[5],b[]=new int[5],c[]=new int[10];
        for(int i=0;i<5;i++){
            a[i]= Integer.parseInt(JOptionPane.showInputDialog("Humano ingresa el valor "+ (i+1)+" del arreglo a"));
        }
        for(int i=0;i<5;i++){
            b[i]= Integer.parseInt(JOptionPane.showInputDialog("Humano ingresa el valor "+ (i+1)+" del arreglo b"));
        }
        int j=0;
        for(int i=0;i<5;i++){
            c[j]=a[i];
            j++;
            c[j]=b[i];
            j++;
        }
        for(int elemento:c){
            System.out.println(elemento);
        }
    }
    
}

? Instalar Netbeans 11 en Ubuntu con Snap [Mas fácil que en windows?]: https://www.youtube.com/watch?v=LllPPV9SMzQ

? Instalar Netbeans 11 en Windows 10: https://www.youtube.com/watch?v=EouitrKS6Cw

? Descargar e Instalar Netbeans 11 en ubuntu 18 04: https://www.youtube.com/watch?v=tWiX3Z5t5kQ

? Netbeans Sublime Theme ?: https://www.youtube.com/watch?v=oAF2Q7mTZZM

? Editar CSS directamenete en Chrome con Netbeans: https://www.youtube.com/watch?v=HlQs0a7R2cY

? Esta lista de reproducción: https://www.youtube.com/playlist?list=PLCTD_CpMeEKTT-qEHGqZH3fkBgXH4GOTF
Codigos en gdrive: https://drive.google.com/file/d/1M6c0VYqrzpq6KwdWkrkw7Aalm8FkdITH/view?usp=sharing
Gracias por apoyar este canal: https://www.patreon.com/programadornovato?fan_landing=true

? Facebook: https://facebook.com/ProgramadorNovatoOficial
? Twitter: https://twitter.com/programadornova
? Linkedin: https://www.linkedin.com/in/programadornovato/
? Instagram: https://www.instagram.com/programadornovato/

Anterior tutorial Siguiente tutorial

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *


Fatal error: Uncaught wfWAFStorageFileException: Unable to verify temporary file contents for atomic writing. in /var/www/html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:51 Stack trace: #0 /var/www/html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php(658): wfWAFStorageFile::atomicFilePutContents('/var/www/html/w...', '<?php exit('Acc...') #1 [internal function]: wfWAFStorageFile->saveConfig('livewaf') #2 {main} thrown in /var/www/html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 51