1本のエピソード

Ejemplo de como rellenar array bidimensional

Relleno de array bidimensional - Java Jorge Hurtado

    • 科学

Ejemplo de como rellenar array bidimensional

    Relleno de arrays

    Relleno de arrays

    int contenido[][] = new int[4][5];

    int k = 0;

    for (int i = 0; i contenido.length; i++) { //1er array

    for (int j = 0; j contenido[i].length; j++) { //2nd array

    contenido[i][j] = k;

    k++;

    System.out.println(contenido[i][j]+ " ");

    System.out.println();

    //creacion de valores (tambien podemos mostrarlo

    // ahi

    }

    }



    // muestra de valores

    for (int i = 0; i contenido.length; i++) {

    for (int j = 0; j contenido[i].length; j++) {

    System.out.println(contenido[i][j]+ " ");

    System.out.println();

    }

    }

    • 3分

科学のトップPodcast

超リアルな行動心理学
FERMONDO
佐々木亮の宇宙ばなし
佐々木亮
サイエントーク
研究者レンとOLエマ
科学のラジオ ~Radio Scientia~
ニッポン放送
a scope ~リベラルアーツで世界を視る目が変わる~
NewsPicks
早稲田大学Podcasts 博士一歩前
早稲田大学広報室