mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
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";
|
|
}
|
|
}
|