Skip to content

Commit

Permalink
6.0.3. Заполнение массива;
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzor committed Sep 26, 2023
1 parent 0f9a8d7 commit 3a5e434
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/ru/j4j/array/ArrayDefinition.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ public static void main(String[] args) {
short[] ages = new short[10];
String[] surnames = new String[100500];
float[] prices = new float[40];
String[] names = new String[4];

System.out.println("Length array ages is: " + ages.length);
System.out.println("Length array surnames is: " + surnames.length);
System.out.println("Length array prices is: " + prices.length);

for (int i = 0; i < names.length; i++) {
names[i] = "Ive " + i;
System.out.println(names[i]);
}
}
}

0 comments on commit 3a5e434

Please sign in to comment.