Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
bowbahdoe committed Sep 17, 2024
1 parent 08f0237 commit 6455d89
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/arrays/set_individual_elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,28 @@ The index of the element to set can also come from a variable.
int index = 2;
String[] response = { "and", "it", "isn't", "opposite", "day" };
System.out.println(
sentence[0]
response[0]
+ " "
+ sentence[1]
+ response[1]
+ " "
+ sentence[2]
+ response[2]
+ " "
+ sentence[3]
+ response[3]
+ " "
+ sentence[4]
+ response[4]
);

response[2] = "is";
System.out.println(
sentence[0]
response[0]
+ " "
+ sentence[1]
+ response[1]
+ " "
+ sentence[2]
+ response[2]
+ " "
+ sentence[3]
+ response[3]
+ " "
+ sentence[4]
+ response[4]
);
~}
```
Expand Down

0 comments on commit 6455d89

Please sign in to comment.