19 lines
181 B
Text
Executable file
19 lines
181 B
Text
Executable file
// test an Array of Objects and access their field
|
|
|
|
class Main {
|
|
void main() {
|
|
D[] x;
|
|
x = new D[50];
|
|
x[22].c.a = 2;
|
|
}
|
|
}
|
|
|
|
class C{
|
|
int a;
|
|
}
|
|
|
|
|
|
class D {
|
|
C c;
|
|
}
|
|
|