TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
399 B
21 lines
399 B
public class Hello {
|
|
private String name;
|
|
private int age;
|
|
|
|
public Hello(String name, int age) {
|
|
this.name = name;
|
|
this.age = age;
|
|
}
|
|
|
|
public String greet(String greeting) {
|
|
return greeting + ", I'm " + name + ", " + age + " years old";
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public int getAge() {
|
|
return age;
|
|
}
|
|
}
|
|
|