mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 08:00:18 +07:00
GitOrigin-RevId: d2908c8bd460b4488f2c2a7c86c8f80899e2667c
20 lines
313 B
Java
20 lines
313 B
Java
package test;
|
|
|
|
public class Test1 {
|
|
void test(){
|
|
String s = "sample";
|
|
String result = switch (s) {
|
|
case "one" -> getFoo();
|
|
default -> "default";
|
|
};
|
|
}
|
|
|
|
private String getFoo() {
|
|
return foo();
|
|
}
|
|
|
|
String foo(){
|
|
return "42";
|
|
}
|
|
}
|