2023-06-27 18:25:31 +00:00
|
|
|
class Instanceof {
|
|
|
|
|
|
|
|
Instanceof(){
|
|
|
|
super(());
|
|
|
|
}
|
|
|
|
void checkInstanceof(){
|
|
|
|
TPH a;
|
|
|
|
a = 4;
|
|
|
|
return a instanceof java.lang.Integer;
|
|
|
|
}
|
|
|
|
|
2023-06-28 20:52:18 +00:00
|
|
|
void checkInstanceOfWithPattern(){
|
|
|
|
TPH b;
|
|
|
|
b = 4.0;
|
|
|
|
if(b instanceof d)
|
|
|
|
{
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return Kein Double;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2023-06-27 18:25:31 +00:00
|
|
|
Instanceof(){
|
|
|
|
super(());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|