mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
19 lines
290 B
Java
19 lines
290 B
Java
class C {
|
|
void foo(Object o) {
|
|
switch (o) {
|
|
case Number n:
|
|
bar("A");
|
|
break;
|
|
case String s:
|
|
bar("B");
|
|
break;
|
|
case null:
|
|
bar("A");
|
|
break;
|
|
default:
|
|
bar("C");
|
|
break;
|
|
}
|
|
}
|
|
void bar(String s){}
|
|
} |