Files
2021-08-18 10:36:23 +00:00

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";
}
}