diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-10-28 14:50:26 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-10-28 14:50:26 +0100 |
commit | 4c05d65aadfe27959b15a88e99dbccd199b534c7 (patch) | |
tree | 39a85aaf4811f8bd62d881b7d3420aff61056524 /ws2015/einfuehrung_in_die_programmierung/blaetter/02/H2-1.md | |
parent | e3d0f58ff28e87b6bf7ca742ef5daecff2012204 (diff) | |
download | uni-4c05d65aadfe27959b15a88e99dbccd199b534c7.tar uni-4c05d65aadfe27959b15a88e99dbccd199b534c7.tar.gz uni-4c05d65aadfe27959b15a88e99dbccd199b534c7.tar.bz2 uni-4c05d65aadfe27959b15a88e99dbccd199b534c7.tar.xz uni-4c05d65aadfe27959b15a88e99dbccd199b534c7.zip |
EiP Blatt 2
Diffstat (limited to 'ws2015/einfuehrung_in_die_programmierung/blaetter/02/H2-1.md')
-rw-r--r-- | ws2015/einfuehrung_in_die_programmierung/blaetter/02/H2-1.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ws2015/einfuehrung_in_die_programmierung/blaetter/02/H2-1.md b/ws2015/einfuehrung_in_die_programmierung/blaetter/02/H2-1.md new file mode 100644 index 0000000..e2fa908 --- /dev/null +++ b/ws2015/einfuehrung_in_die_programmierung/blaetter/02/H2-1.md | |||
@@ -0,0 +1,18 @@ | |||
1 | # Speicherbild | ||
2 | |||
3 | Wir notieren eine Referenz mit Variablennamen `x` auf ein Objekt, dessen Repräsentation als String `...` ist, wie folgt: | ||
4 | |||
5 | ~~~ {.java} | ||
6 | x -> ... | ||
7 | ~~~ | ||
8 | |||
9 | ~~~ {.java} | ||
10 | Int x = 9 | ||
11 | Prof prof1 -> Prof[name="Chris",teaching=9] | ||
12 | Prof prof2 -> Prof[name="Dora",teaching=9] | ||
13 | Student student1 -> Student[name="Alois",matrikel=1234] | ||
14 | Student student2 -> Student[name="Bine",matrikel=4567] | ||
15 | Student student3 -> Student[name="Alois",matrikel=1234] | ||
16 | ~~~ | ||
17 | |||
18 | `student1` und `student3` zeigen auf unterschiedliche Speicherbereiche. | ||