Cheatography
https://cheatography.com
Gleitkomma-Arithmetik
1/0.0 |
POSITIVE_INFINITY |
-1/0.0 |
NEGATIVE_INFINITY |
0/0.0 |
NaN |
1/0 |
java.lang.ArithmeticException: / by zero |
Overloading & Overriding
Overloading: Zur Compiletime
=> Immer die Spezifischte
Overriding: Zur Runntime
class Graphic {
void moveTo(Graphic other) {
// Method 1
}
}
class Circle extends Graphic {
void moveTo(Graphic other) {
// Method 2
}
void moveTo(Circle other) {
// Method 3
}
}
g.moveTo(c)
Overloading zur Compiletime:
- Nur Method 1 & 2 Möglich, Brille "Graphic"
Zur Runntime:
- Ah, g ist ein Circle, dann wird Method 2 aufgerufen |
Java reference types
int[] x = new int[10]; |
Normales Array |
int[][] m = new int[2][3]; |
2 Dimensionales Array |
Arrays.equals(a, b) |
Arrays vergleichen |
Arrays.deepEquals(a, b) |
n-Dimensionale Arrays vergleichen |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment