Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132937 views
License: OTHER
1
public class QuizArray {
2
public static void main(String[] args) {
3
String[] myArray1 = { " geh ", "du", "alter", "esel" };
4
String[] myArray2 = myArray1;
5
myArray2[3] = "sack";
6
7
System.out.print("myArray1: ");
8
for (int i = 0; i < myArray1.length; i++) {
9
System.out.print(myArray1[i] + " ");
10
}
11
12
System.out.print("\nmyArray2: ");
13
for (int i = 0; i < myArray2.length; i++) {
14
System.out.print(myArray2[i] + " ");
15
}
16
}
17
}
18
19