public class App {
public static void main(String[] args) {
// tablou 1D
int[] values = {3, 5, 2343};
// Avem nevoie doar de un index ca sa accesam valoarea.
System.out.println(values[2]);
// tablou 2D
int[][] grid = {
{3, 5, 2343},
{2, 4},
{1, 2, 3, 4}
};
// Avem nevoie de doi indecsi ca sa accesam valoarea
System.out.println(grid[1][1]);
System.out.println(grid[0][2]);
// Creare fara initializare
String[][] texts = new String[2][3];
texts[0][1] = "Buna acolo";
System.out.println(texts[0][1]);
// Cum navigam printr-un tablou 2D
// intai navigam printre randuri, apoi pt fiecare rand
// mergem prin coloane.
for(int row=0; row < grid.length; row++) {
for(int col=0; col < grid[row].length; col++) {
System.out.print(grid[row][col] + "\t");
}
System.out.println();
}
// Ultimul index al tabloului este optional.
String[][] words = new String[2][];
// Fiecare sub-array este null.
System.out.println(words[0]);
// Putem crea subarrays 'manual'.
words[0] = new String[3];
// Putem seta o valuare in sub-array-ul
// pe care l-am creat.
words[0][1] = "buna acolo";
System.out.println(words[0][1]);
}
}
Output is:
2343
4
2343
Buna acolo
3 5 2343
2 4
1 2 3 4
null
buna acolo
antibiotics cipro: ciprofloxacin generic price – ciprofloxacin mail online
Узнайте больше о поиске авто http://kino-tv-forum.ru/blog/po-kakim-kriterijam-vybirat-avtomobil/2024-03-18-385
https://nolvadex.life/# generic tamoxifen
http://nolvadex.life/# tamoxifen for gynecomastia reviews
לא מעט חברים ורעים שהיו פעם לקוחות השירות, אשר יוכלו להמליץ לכם. נערות ליווי בצפון פרטיות עם תמונות אמיתיות מגשימות הנאה רבה, ומספקות פורקן וסיפוק רב על רקע הנוף הגלילי הירוק של הצפון — אז חבל על כל רגע נערות ליווי בדרום מתגורר באזור הדרום אך אינך נערות ליווי זולות
Thank you for the auspicious writeup It in fact was a amusement account it Look advanced to far added agreeable from you However how can we communicate
https://dsmedia.pro/article/kak-agregatory-uproschajut-poisk-i-vybor-avtomobilja