Tag: 方法的

是否可以在String中声明Java中的默认参数?

是否可以在String方法中使用默认参数。 代码如下所示: public void test(String name=”exampleText”) { } 上面的代码生成错误。 有可能纠正它吗?