GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Flussdiagramm

Examples of 2-D Declarations

Olivia B Englisch

Inhalt des Flussdiagramms

  1. 2-D ARRAYS

  2. String[][] a = new String[3][4];

  3. a[0][0]

  4. a[0][1]

  5. a[0][2]

  6. a[0][3]

  7. a[1][0]

  8. a[1][1]

  9. a[1][2]

  10. a[1][3]

  11. a[2][0]

  12. a[2][1]

  13. a[2][2]

  14. a[2][3]

  15. Each block represents a String variable

  16. Each row represents an array of 4 elements

  17. int[][] nums = {{1, 2, 3, 4}, {2, 11, 16, 3}, {18, 45, 31, 2}, {3, 51, 43, 1}};

  18. This array has 4 rows and 4 columns, and it is made up of integer variables

  19. 1

  20. 2

  21. 3

  22. 4

  23. 2

  24. 11

  25. 16

  26. 3

  27. 18

  28. 45

  29. 31

  30. 2

  31. 3

  32. 51

  33. 43

  34. 1

  35. int temp = nums[2][0];

    The above declaration will assign the value 18 to the variable temp. 18 is located in the 3rd row (index 2) and first column (index 0) of the matrix

Informationen

Beschreibung
Flussdiagramm am Examples of 2-D Declarations, erstellt von Olivia B am 01/06/2018.
Erstellt von
Olivia B
Aufrufe
2
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck