G
Gast
Gast
Hi,
ich suche Informationen zur Typbestimmung. Also wo erklärt wird, welcher Typ rauskommt, wenn ich int + double mache.
Damit ihr euch was drunter vorstellen könnt habe ich mal n bisschen Code rangehängt.
ich suche Informationen zur Typbestimmung. Also wo erklärt wird, welcher Typ rauskommt, wenn ich int + double mache.
Damit ihr euch was drunter vorstellen könnt habe ich mal n bisschen Code rangehängt.
Code:
class X {
int i1;
long l1;
double d1;
boolean b1;
int [] ia1;
Integer i2;
Integer [] ia2;
Double d2,d3;
X x1;
X[] xa1;
X[] [] xm1;
Object o1;
Object [] oa1;
public void test(){
i1 + 1; //1
i1 + l1; //2
i1 + d1; //3
i1++; //4
i2++; //5
i1 + i2; //6
d2 + d3; //7
o1 = ia1; //8
oa1 = ia1; //9
o1 = ia1[i1]; //10
oa1 = ia2; //11
o1 = xa1; //12
o1 = xa1[i1]; //13
xa1 = oa1; //14
xa1 = (X[])oa1; //15
}
}