P187: HelloRequest.java
public class HelloRequest implements IRequest {
private String name;
public HelloRequest(String name) {
this.name = name;
}
public void execute() {
System.out.printf("哈喽%s %n", name);
}
}
<= There is also one specifier that doesn't correspond to an argument. It is "%n" which outputs a line break. A "/n" can also be used in some cases, but since "%n" always outputs the correct platform-specific line separator, it is portable across platforms whereas"/n" is not.