Anki Deck Changes

Commit: 33c97751 - add some eprog cards

Author: obrhubr <obrhubr@gmail.com>

Date: 2026-01-24T21:43:05+01:00

Changes: 3 note(s) changed (3 added, 0 modified, 0 deleted)

Note 1: ETH::1. Semester::EProg

Deck: ETH::1. Semester::EProg
Note Type: Horvath Classic
GUID: J)-A!rQ/Od
added

Previous

Note did not exist

New Note

Front

ETH::1._Semester::EProg::2._First_Java_Programs::3._Simple_Calculations::1._Types,_Variables,_Values
int[][] b = new int[3][0]
int[] c = new int[3] 
 b[0] = c
does this compile / runtime?

Back

ETH::1._Semester::EProg::2._First_Java_Programs::3._Simple_Calculations::1._Types,_Variables,_Values
int[][] b = new int[3][0]
int[] c = new int[3] 
 b[0] = c
does this compile / runtime?

Yes, it works fine as we just set the pointer of b[0] to c. Java does not typecheck array dimensions.
Field-by-field Comparison
Field Before After
Front <code>int[][] b = new int[3][0]</code><br><code>int[] c = new int[3]</code>&nbsp;<br>&nbsp;<code>b[0] = c<br></code> does this compile / runtime?
Back Yes, it works fine as we just set the pointer of b[0] to c. Java does not typecheck array dimensions.
Tags: ETH::1._Semester::EProg::2._First_Java_Programs::3._Simple_Calculations::1._Types,_Variables,_Values

Note 2: ETH::1. Semester::EProg

Deck: ETH::1. Semester::EProg
Note Type: Horvath Cloze
GUID: p1.Wet4$5I
added

Previous

Note did not exist

New Note

Front

ETH::1._Semester::EProg::10._Inheritance::2._Polymorphism::2._Casting
If we see "((C) D).something()" as a cast we can assume that D is a subtype of C.

Back

ETH::1._Semester::EProg::10._Inheritance::2._Polymorphism::2._Casting
If we see "((C) D).something()" as a cast we can assume that D is a subtype of C.

This is relevant for EProg theory exercises in which we have to reconstruct a class hierarchy.
Field-by-field Comparison
Field Before After
Text If we see "((C) D).something()" as a cast we can assume that {{c1::D is a subtype of C}}.
Extra This is relevant for EProg theory exercises in which we have to reconstruct a class hierarchy.
Tags: ETH::1._Semester::EProg::10._Inheritance::2._Polymorphism::2._Casting

Note 3: ETH::1. Semester::EProg

Deck: ETH::1. Semester::EProg
Note Type: Horvath Classic
GUID: tja~6C@vsv
added

Previous

Note did not exist

New Note

Front

ETH::1._Semester::EProg::2._First_Java_Programs::3._Simple_Calculations::1._Types,_Variables,_Values
Does Java enforce array dimensions using type- or runtime-checks?

Back

ETH::1._Semester::EProg::2._First_Java_Programs::3._Simple_Calculations::1._Types,_Variables,_Values
Does Java enforce array dimensions using type- or runtime-checks?

No.

int[][] b = new int[3][0]
int[] c = new int[3] 
 b[0] = c

is fine
Field-by-field Comparison
Field Before After
Front Does Java enforce array dimensions using type- or runtime-checks?
Back No.<br><br><code>int[][] b = new int[3][0]</code> <br><code>int[] c = new int[3]</code>&nbsp;<br>&nbsp;<code>b[0] = c<br><br></code> is fine
Tags: ETH::1._Semester::EProg::2._First_Java_Programs::3._Simple_Calculations::1._Types,_Variables,_Values
↑ Top